Sha256: 986e09542f31d6dc77b1aed8691e7088bb8b7675157e9301db0924a73ccf081b
Contents?: true
Size: 487 Bytes
Versions: 19
Compression:
Stored size: 487 Bytes
Contents
require 'json' module Embulk module Guess class ZendeskGuess < TextGuessPlugin Plugin.register_guess("zendesk", self) 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 end end end
Version data entries
19 entries across 19 versions & 2 rubygems