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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19296dd9ee329eee67c43509d2ab0012a9f4f47f
4
- data.tar.gz: b4518be78d421506a7e1820056f4b5022b79eec7
3
+ metadata.gz: 7e4c2dcce049fc3bf3c8d9825b07154ffe0bdf5c
4
+ data.tar.gz: 0759d5be8059eb22e08f85367fb15df1c601bb47
5
5
  SHA512:
6
- metadata.gz: c00321b4699cb60d9786c7808a0dbb10acfa4cab820df0394397289087308fb3e96c185b388334b3d6caa0b41920e146f07454fdbbf7b04b8b5f534579ef434f
7
- data.tar.gz: db88b4fa5354387fdae08f1b49382ae1aa3cfa97eefa735fb2e619e5ea8d46c47b77d61a311dd4f9c801bdb773bc007edc1d30d19d0ecb98fef073a7674113fa
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 dataduck_zz_old_#{ table.name }")
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 dataduck_zz_old_#{ table.name }")
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 dataduck_zz_old_#{ table.name }")
191
+ self.query("DROP TABLE IF EXISTS zz_dataduck_old_#{ table.name }")
192
192
  end
193
193
 
194
194
  def load_table!(table)
@@ -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
- extract_by_value = destination.query("SELECT MAX(#{ self.extract_by_column }) AS val FROM #{ self.building_name }").first
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
@@ -1,6 +1,6 @@
1
1
  module DataDuck
2
2
  VERSION_MAJOR = 0
3
3
  VERSION_MINOR = 5
4
- VERSION_PATCH = 1
4
+ VERSION_PATCH = 2
5
5
  VERSION = [VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH].join('.')
6
6
  end
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.1
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-21 00:00:00.000000000 Z
11
+ date: 2015-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler