Class: Embulk::Guess::ZendeskGuess
- Inherits:
-
TextGuessPlugin
- Object
- TextGuessPlugin
- Embulk::Guess::ZendeskGuess
- Defined in:
- lib/embulk/guess/zendesk.rb
Instance Method Summary collapse
Instance Method Details
#guess_text(config, sample_text) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/embulk/guess/zendesk.rb', line 8 def guess_text(config, sample_text) {:columns => SchemaGuess.from_hash_records(JSON.parse(sample_text)).map do |c| { name: c.name, type: c.type, **(c.format ? {format: c.format} : {}) } end } end |