Class: Ductr::ETL::Transform

Inherits:
Control
  • Object
show all
Defined in:
lib/ductr/etl/controls/transform.rb

Overview

Base class for implementing transforms.

Direct Known Subclasses

BufferedTransform, SequelBase::BasicLookup

Instance Attribute Summary

Attributes inherited from Control

#adapter, #job_method, #options

Instance Method Summary collapse

Methods inherited from Control

#call_method, #initialize

Constructor Details

This class inherits a constructor from Ductr::ETL::Control

Instance Method Details

#closevoid

This method returns an undefined value.

Called when the last row is reached.



27
# File 'lib/ductr/etl/controls/transform.rb', line 27

def close; end

#process(row) {|row| ... } ⇒ void

This method returns an undefined value.

Calls the control method and passes the row. You must return nil if you use the row yielder block.

Parameters:

  • row (Object)

    The row to process

Yields:

  • (row)

    The row yielder



18
19
20
# File 'lib/ductr/etl/controls/transform.rb', line 18

def process(row, &)
  call_method(row, &)
end