Class: Chronicle::ETL::ChronicleTransformer

Inherits:
Transformer
  • Object
show all
Defined in:
lib/chronicle/etl/transformers/chronicle_transformer.rb

Instance Attribute Summary

Attributes inherited from Transformer

#stashed_records

Attributes included from Registry::SelfRegistering

#connector_registration

Instance Method Summary collapse

Methods inherited from Transformer

#call, #call_finish, #finish, #initialize

Methods included from Registry::SelfRegistering

#register_connector

Methods included from Configurable

included

Constructor Details

This class inherits a constructor from Chronicle::ETL::Transformer

Instance Method Details

#transform(record) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/chronicle/etl/transformers/chronicle_transformer.rb', line 11

def transform(record)
  converter_klass = find_converter(record.extraction)
  # TODO: handle missing converter

  converter_klass.new.call(record) do |transformed_record|
    yield transformed_record.data
  end
end