dataduck 0.5.1 → 0.5.2
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/dataduck/redshift_destination.rb +3 -3
- data/lib/dataduck/table.rb +2 -1
- data/lib/dataduck/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e4c2dcce049fc3bf3c8d9825b07154ffe0bdf5c
|
4
|
+
data.tar.gz: 0759d5be8059eb22e08f85367fb15df1c601bb47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc9a7a2a94b204ecc367da5666520dfdfc06129ff7118821c873b275a8fe6f55bffa5bda78380dd6b34aa603612e68b35e646c9d4e40b6f817875f7bd9d50ce2
|
7
|
+
data.tar.gz: 91b3769be124f595411bf55b53359d6fc2914db6c44752bd514750ac1be848b94b8ee2317a0546eecf04303ccc18e4a58279ec6a24a5b67c4e49e2b6903ebb5b
|
@@ -180,15 +180,15 @@ module DataDuck
|
|
180
180
|
end
|
181
181
|
|
182
182
|
def finish_fully_reloading_table!(table)
|
183
|
-
self.query("DROP TABLE IF EXISTS
|
183
|
+
self.query("DROP TABLE IF EXISTS zz_dataduck_old_#{ table.name }")
|
184
184
|
|
185
185
|
table_already_exists = self.table_names.include?(table.name)
|
186
186
|
if table_already_exists
|
187
|
-
self.query("ALTER TABLE #{ table.name } RENAME TO
|
187
|
+
self.query("ALTER TABLE #{ table.name } RENAME TO zz_dataduck_old_#{ table.name }")
|
188
188
|
end
|
189
189
|
|
190
190
|
self.query("ALTER TABLE #{ table.staging_name } RENAME TO #{ table.name }")
|
191
|
-
self.query("DROP TABLE IF EXISTS
|
191
|
+
self.query("DROP TABLE IF EXISTS zz_dataduck_old_#{ table.name }")
|
192
192
|
end
|
193
193
|
|
194
194
|
def load_table!(table)
|
data/lib/dataduck/table.rb
CHANGED
@@ -125,7 +125,8 @@ module DataDuck
|
|
125
125
|
|
126
126
|
if self.extract_by_column
|
127
127
|
if destination.table_names.include?(self.building_name)
|
128
|
-
|
128
|
+
extract_by_column_without_table = self.extract_by_column.include?(".") ? self.extract_by_column.split(".").last : self.extract_by_column
|
129
|
+
extract_by_value = destination.query("SELECT MAX(#{ extract_by_column_without_table }) AS val FROM #{ self.building_name }").first
|
129
130
|
extract_by_value = extract_by_value.nil? ? nil : extract_by_value[:val]
|
130
131
|
|
131
132
|
if extract_by_value
|
data/lib/dataduck/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dataduck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Pickhardt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|