Class: Chronicle::ETL::Extractor
- Inherits:
-
Object
- Object
- Chronicle::ETL::Extractor
- Extended by:
- Registry::SelfRegistering
- Includes:
- Configurable
- Defined in:
- lib/chronicle/etl/extractors/extractor.rb
Overview
Abstract class representing an Extractor for an ETL job
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Registry::SelfRegistering
Instance Method Summary collapse
-
#extract ⇒ Object
Entrypoint for this Extractor.
-
#initialize(options = {}) ⇒ Extractor
constructor
Construct a new instance of this extractor.
-
#prepare ⇒ Object
Hook called before #extract.
-
#results_count ⇒ Object
An optional method to calculate how many records there are to extract.
Methods included from Registry::SelfRegistering
Methods included from Configurable
Constructor Details
#initialize(options = {}) ⇒ Extractor
Construct a new instance of this extractor. Options are passed in from a Runner == Parameters: options:: Options for configuring this Extractor
22 23 24 |
# File 'lib/chronicle/etl/extractors/extractor.rb', line 22 def initialize( = {}) () end |
Instance Method Details
#extract ⇒ Object
Entrypoint for this Extractor. Called by a Runner. Expects a series of records to be yielded
34 35 36 |
# File 'lib/chronicle/etl/extractors/extractor.rb', line 34 def extract raise NotImplementedError end |
#prepare ⇒ Object
Hook called before #extract. Useful for gathering data, initializing proxies, etc
27 |
# File 'lib/chronicle/etl/extractors/extractor.rb', line 27 def prepare; end |
#results_count ⇒ Object
An optional method to calculate how many records there are to extract. Used primarily for building the progress bar
31 |
# File 'lib/chronicle/etl/extractors/extractor.rb', line 31 def results_count; end |