Sha256: 88832c5d4b9eb728c5e08873aafceaef3d112ee98d7310f4a299d315e6177d90
Contents?: true
Size: 796 Bytes
Versions: 3
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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
embulk-0.4.4 | lib/embulk/data/new/ruby/filter.rb.erb |
embulk-0.4.3 | lib/embulk/data/new/ruby/filter.rb.erb |
embulk-0.4.2 | lib/embulk/data/new/ruby/filter.rb.erb |