Class: Remi::DataTarget
- Inherits:
-
DataSubject
- Object
- DataSubject
- Remi::DataTarget
- Defined in:
- lib/remi/data_subject.rb
Direct Known Subclasses
Defined Under Namespace
Classes: CsvFile, DataFrame, Postgres, Salesforce, SftpFile
Instance Attribute Summary
Attributes inherited from DataSubject
Instance Method Summary collapse
-
#load ⇒ Object
Public: Loads data to the target.
-
#load! ⇒ Object
Public: Performs the load operation, regardless of whether it has already executed.
Methods inherited from DataSubject
#df, #df=, #enforce_types, #field_symbolizer, #initialize
Constructor Details
This class inherits a constructor from Remi::DataSubject
Instance Method Details
#load ⇒ Object
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
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 |