Sha256: 0a1d66f89ac9120eaf4c3f4bcf6f1ad2b2b502846b8a4629a27be2aea742d1c2
Contents?: true
Size: 620 Bytes
Versions: 6
Compression:
Stored size: 620 Bytes
Contents
# Not to be used as a standalone guess plugin # This is just a thin wrapper to leverage the SchemaGuess Ruby implementation from Java side require 'json' module Embulk module Guess class JiraGuess < TextGuessPlugin Plugin.register_guess("jira", 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
6 entries across 6 versions & 1 rubygems