redshift_copier 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/redshift_copier/{copy_file.rb → copy.rb} +4 -4
- data/lib/redshift_copier/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a365fd0d49c267e3c2bf8f8e94ef88522ec1e00
|
4
|
+
data.tar.gz: 80adf0d5d19c3ba1a9c70cca0eec9ec69e44d36b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34400dc0f3115f3c93d2431901a110c4fbf8dbcfd659251ab90f5feb49a874d534e4cb2f6eed4ca7a0804eacd88f73dd3eba061cc115af57a260c88c2905d060
|
7
|
+
data.tar.gz: c4286815b0f9069aa161a7c4f36e49a3fbdf6fabf2f111af9932bf431527de5b3c73a9acbae343e018f56136429268b8c9a44cf5f28a040f4e2e9c157a013d61
|
@@ -1,6 +1,6 @@
|
|
1
|
-
module RedshiftCopier; class
|
1
|
+
module RedshiftCopier; class Copy
|
2
2
|
|
3
|
-
attr_reader :schema, :table, :create_sql, :aws_access_key_id, :aws_secret_access_key, :
|
3
|
+
attr_reader :schema, :table, :create_sql, :aws_access_key_id, :aws_secret_access_key, :s3_path, :db_config, :copy_command_options
|
4
4
|
|
5
5
|
def initialize(args)
|
6
6
|
@schema = args.fetch(:schema)
|
@@ -8,7 +8,7 @@ module RedshiftCopier; class CopyFile
|
|
8
8
|
@create_sql = args.fetch(:create_sql)
|
9
9
|
@aws_access_key_id = args.fetch(:aws_access_key_id)
|
10
10
|
@aws_secret_access_key = args.fetch(:aws_secret_access_key)
|
11
|
-
@
|
11
|
+
@s3_path = args.fetch(:s3_path)
|
12
12
|
@db_config = args.fetch(:db_config)
|
13
13
|
@copy_command_options = args.fetch(:copy_command_options, "dateformat 'auto' timeformat 'auto' blanksasnull emptyasnull escape removequotes delimiter ',' ignoreheader 1;")
|
14
14
|
end
|
@@ -34,7 +34,7 @@ module RedshiftCopier; class CopyFile
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def copy_sql
|
37
|
-
"copy #{schema}.#{table} from '#{
|
37
|
+
"copy #{schema}.#{table} from '#{s3_path}'"\
|
38
38
|
" credentials '#{credentials}'"\
|
39
39
|
" #{copy_command_options}"
|
40
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redshift_copier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MrPowers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,7 +84,7 @@ files:
|
|
84
84
|
- bin/console
|
85
85
|
- bin/setup
|
86
86
|
- lib/redshift_copier.rb
|
87
|
-
- lib/redshift_copier/
|
87
|
+
- lib/redshift_copier/copy.rb
|
88
88
|
- lib/redshift_copier/version.rb
|
89
89
|
- redshift_copier.gemspec
|
90
90
|
homepage: https://github.com/MrPowers/redshift_copier
|