Class: Ductr::SequelBase::BasicLookup
- Inherits:
-
ETL::Transform
- Object
- ETL::Control
- ETL::Transform
- Ductr::SequelBase::BasicLookup
- Defined in:
- lib/ductr/sequel_base/basic_lookup.rb
Overview
A lookup control that execute one query per row.
Instance Attribute Summary
Attributes inherited from ETL::Control
#adapter, #job_method, #options
Instance Method Summary collapse
-
#process(row) ⇒ Hash<Symbol, Object>
Calls the job’s method to merge its result with the current row.
Methods inherited from ETL::Transform
Methods inherited from ETL::Control
Constructor Details
This class inherits a constructor from Ductr::ETL::Control
Instance Method Details
#process(row) ⇒ Hash<Symbol, Object>
Calls the job’s method to merge its result with the current row.
16 17 18 19 20 21 |
# File 'lib/ductr/sequel_base/basic_lookup.rb', line 16 def process(row) matching_row = call_method(adapter.db, row).first return row unless matching_row row.merge matching_row end |