Class: Chronicle::ETL::BufferTransformer
- Inherits:
-
Transformer
- Object
- Transformer
- Chronicle::ETL::BufferTransformer
- Defined in:
- lib/chronicle/etl/transformers/buffer_transformer.rb
Instance Attribute Summary
Attributes inherited from Transformer
Attributes included from Registry::SelfRegistering
Instance Method Summary collapse
Methods inherited from Transformer
#call, #call_finish, #initialize
Methods included from Registry::SelfRegistering
Methods included from Configurable
Constructor Details
This class inherits a constructor from Chronicle::ETL::Transformer
Instance Method Details
#finish ⇒ Object
24 25 26 |
# File 'lib/chronicle/etl/transformers/buffer_transformer.rb', line 24 def finish flush_stashed_records end |
#transform(record) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/chronicle/etl/transformers/buffer_transformer.rb', line 13 def transform(record) stash_record(record) # FIXME: this doesn't seem to be working with the runner return if @stashed_records.size < @config.size # FIXME: this will result in the wrong extraction being associated with # the batch of flushed records flush_stashed_records.map(&:data) end |