Class: Tango::ETL::OperatorInterface

Inherits:
Object
  • Object
show all
Defined in:
lib/tango/etl/operator_interface.rb

Overview

Interface of an operator that implements ETL pattern

Author:

  • Mckomo

Class Method Summary collapse

Class Method Details

.extract(element) ⇒ Object

Extract resource params

Parameters:

  • element (Object)

    Element from witch resources should be extracted

Returns:

  • (Object)

    Extracted resource or array with resources

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/tango/etl/operator_interface.rb', line 14

def self.extract( element )
  raise NotImplementedError
end

.load(resources) ⇒ Object

Load resources into a storage

Parameters:

  • resources (Array)

    Batch of resources to load

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/tango/etl/operator_interface.rb', line 29

def self.load( resources )
  raise NotImplementedError
end

.transform(resource) ⇒ Object

Transform resource params to desired state

Parameters:

  • resource (Object)

    Resource or array with resources

Returns:

  • (Object)

    Transformed resource or array with resources

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/tango/etl/operator_interface.rb', line 22

def self.transform( resource )
  raise NotImplementedError
end