Sha256: 99915735cdf8413e94453e8381a36ba309933f59ca3dbf740d41d41711de35f6
Contents?: true
Size: 796 Bytes
Versions: 28
Compression:
Stored size: 796 Bytes
Contents
module Embulk module Filter class <%= ruby_class_name %> < FilterPlugin Plugin.register_filter(<%= name.dump %>, self) def self.transaction(config, in_schema, &control) # configuration code: task = { "property1" => config.param("property1", :string), "property2" => config.param("property2", :integer, default: 0), } yield(task, out_columns) end def init # initialization code: @property1 = task["property1"] @property2 = task["property2"] end def close end def add(page) # filtering code: page.each do |record| page_builder.add(record) end end def finish page_builder.finish end end end end
Version data entries
28 entries across 28 versions & 1 rubygems