Class: ETL::Processor::SequenceProcessor
- Inherits:
-
RowProcessor
- Object
- Processor
- RowProcessor
- ETL::Processor::SequenceProcessor
- Defined in:
- lib/etl/processor/sequence_processor.rb
Overview
Row level processor to generate a sequence.
Configuration options:
-
:context
: A context name, if none is specified then the context will be the current ETL run -
:dest
: The destination field name
Instance Method Summary collapse
Methods inherited from RowProcessor
Methods inherited from Processor
Constructor Details
This class inherits a constructor from ETL::Processor::RowProcessor
Instance Method Details
#process(row) ⇒ Object
10 11 12 13 14 |
# File 'lib/etl/processor/sequence_processor.rb', line 10 def process(row) sequences[configuration[:context]] ||= 0 row[configuration[:dest]] = sequences[configuration[:context]] += 1 row end |