Class: Chronicle::ETL::Loader

Inherits:
Object
  • Object
show all
Extended by:
Registry::SelfRegistering
Includes:
Configurable, Chronicle::ETL::Loaders::Helpers::EncodingHelper
Defined in:
lib/chronicle/etl/loaders/loader.rb

Overview

Abstract class representing a Loader for an ETL job

Direct Known Subclasses

CSVLoader, JSONLoader, RestLoader, TableLoader

Instance Attribute Summary

Attributes included from Registry::SelfRegistering

#connector_registration

Instance Method Summary collapse

Methods included from Registry::SelfRegistering

register_connector

Methods included from Chronicle::ETL::Loaders::Helpers::EncodingHelper

#force_utf8

Methods included from Configurable

included

Constructor Details

#initialize(options = {}) ⇒ Loader

Construct a new instance of this loader. Options are passed in from a Runner == Parameters: options:: Options for configuring this Loader



21
22
23
# File 'lib/chronicle/etl/loaders/loader.rb', line 21

def initialize(options = {})
  apply_options(options)
end

Instance Method Details

#finishObject

Called once there are no more records to process



34
# File 'lib/chronicle/etl/loaders/loader.rb', line 34

def finish; end

#loadObject

Load a single record

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/chronicle/etl/loaders/loader.rb', line 29

def load
  raise NotImplementedError
end

#startObject

Called once before processing records



26
# File 'lib/chronicle/etl/loaders/loader.rb', line 26

def start; end