Class: RedshiftExtractor::Drop
- Inherits:
-
Object
- Object
- RedshiftExtractor::Drop
- Defined in:
- lib/redshift_extractor/drop.rb
Instance Attribute Summary collapse
-
#destination_schema ⇒ Object
readonly
Returns the value of attribute destination_schema.
-
#destination_table ⇒ Object
readonly
Returns the value of attribute destination_table.
Instance Method Summary collapse
- #drop_sql ⇒ Object
-
#initialize(args) ⇒ Drop
constructor
A new instance of Drop.
Constructor Details
#initialize(args) ⇒ Drop
Returns a new instance of Drop.
5 6 7 8 |
# File 'lib/redshift_extractor/drop.rb', line 5 def initialize(args) @destination_schema = args.fetch(:destination_schema) @destination_table = args.fetch(:destination_table) end |
Instance Attribute Details
#destination_schema ⇒ Object (readonly)
Returns the value of attribute destination_schema.
3 4 5 |
# File 'lib/redshift_extractor/drop.rb', line 3 def destination_schema @destination_schema end |
#destination_table ⇒ Object (readonly)
Returns the value of attribute destination_table.
3 4 5 |
# File 'lib/redshift_extractor/drop.rb', line 3 def destination_table @destination_table end |
Instance Method Details
#drop_sql ⇒ Object
10 11 12 |
# File 'lib/redshift_extractor/drop.rb', line 10 def drop_sql "drop table if exists #{destination_schema}.#{destination_table};" end |