Class: BigShift::Factory
- Inherits:
-
Object
- Object
- BigShift::Factory
- Defined in:
- lib/bigshift/cli.rb
Instance Method Summary collapse
- #big_query_dataset ⇒ Object
- #cloud_storage_transfer ⇒ Object
-
#initialize(config) ⇒ Factory
constructor
A new instance of Factory.
- #redshift_table_schema ⇒ Object
- #redshift_unloader ⇒ Object
Constructor Details
#initialize(config) ⇒ Factory
Returns a new instance of Factory.
117 118 119 |
# File 'lib/bigshift/cli.rb', line 117 def initialize(config) @config = config end |
Instance Method Details
#big_query_dataset ⇒ Object
133 134 135 |
# File 'lib/bigshift/cli.rb', line 133 def big_query_dataset @big_query_dataset ||= BigQuery::Dataset.new(bq_service, raw_gcp_credentials['project_id'], @config[:bq_dataset_id], logger: logger) end |
#cloud_storage_transfer ⇒ Object
125 126 127 |
# File 'lib/bigshift/cli.rb', line 125 def cloud_storage_transfer @cloud_storage_transfer ||= CloudStorageTransfer.new(gcs_transfer_service, raw_gcp_credentials['project_id'], aws_credentials, logger: logger) end |
#redshift_table_schema ⇒ Object
129 130 131 |
# File 'lib/bigshift/cli.rb', line 129 def redshift_table_schema @redshift_table_schema ||= RedshiftTableSchema.new(@config[:rs_table_name], rs_connection) end |
#redshift_unloader ⇒ Object
121 122 123 |
# File 'lib/bigshift/cli.rb', line 121 def redshift_unloader @redshift_unloader ||= RedshiftUnloader.new(rs_connection, aws_credentials, logger: logger) end |