Class: Remi::DataTarget

Inherits:
DataSubject show all
Defined in:
lib/remi/data_subject.rb

Direct Known Subclasses

CsvFile, DataFrame, Postgres, Salesforce, SftpFile

Defined Under Namespace

Classes: CsvFile, DataFrame, Postgres, Salesforce, SftpFile

Instance Attribute Summary

Attributes inherited from DataSubject

#fields

Instance Method Summary collapse

Methods inherited from DataSubject

#df, #df=, #enforce_types, #field_symbolizer, #initialize

Constructor Details

This class inherits a constructor from Remi::DataSubject

Instance Method Details

#loadObject

Public: Loads data to the target. This is automatically called after all transforms have executed, but could also get called manually. The actual load operation is only executed if hasn’t already.

Returns true if the load operation was successful.



93
94
95
96
97
# File 'lib/remi/data_subject.rb', line 93

def load
  return true if @loaded || df.size == 0

  @loaded = load!
end

#load!Object

Public: Performs the load operation, regardless of whether it has already executed.

Returns true if the load operation was successful

Raises:

  • (NoMethodError)


103
104
105
106
107
# File 'lib/remi/data_subject.rb', line 103

def load!
  raise NoMethodError, "#{__method__} not defined for #{self.class.name}"

  false
end