embulk-output-vertica 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/embulk-output-vertica.gemspec +1 -1
- data/lib/embulk/output/vertica.rb +10 -4
- 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: 5378b73846425007a9de7f30869bfd2206b06bed
|
4
|
+
data.tar.gz: cc430ff8ec752696eec4933fdc982832bf179133
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c599fac58e80276b4f8a312bb962b6281f2e95752197a429a3f5b05d9b71e131037ad653f5556a5939bb6cfa7f008b91a700e89d9345d54d8c185fa98e3b5dc
|
7
|
+
data.tar.gz: 25a0159744f47d3e4e0343673ba940f816335b1fae2a9bbbd84afec0d7d45daf06cc8d19edb7b453a3a5c477ecdd3cb92b136f6d7ad6aed6b9ffc93d98d8e935
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "embulk-output-vertica"
|
3
|
-
spec.version = "0.7.
|
3
|
+
spec.version = "0.7.1"
|
4
4
|
spec.authors = ["eiji.sekiya", "Naotoshi Seo"]
|
5
5
|
spec.email = ["eiji.sekiya.0326@gmail.com", "sonots@gmail.com"]
|
6
6
|
spec.summary = "Vertica output plugin for Embulk"
|
@@ -80,10 +80,16 @@ module Embulk
|
|
80
80
|
|
81
81
|
# create a temp table
|
82
82
|
query(jv, %[DROP TABLE IF EXISTS #{quoted_schema}.#{quoted_temp_table}])
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
83
|
+
|
84
|
+
if task['mode'] == 'REPLACE'
|
85
|
+
# In the case of replace mode, this temp table is replaced with the original table. So, projections should also be copied
|
86
|
+
query(jv, %[CREATE TABLE #{quoted_schema}.#{quoted_temp_table} LIKE #{quoted_schema}.#{quoted_table} INCLUDING PROJECTIONS])
|
87
|
+
else
|
88
|
+
query(jv, %[CREATE TABLE #{quoted_schema}.#{quoted_temp_table} LIKE #{quoted_schema}.#{quoted_table}])
|
89
|
+
# Create internal vertica projection beforehand, otherwirse, parallel copies lock table to create a projection and we get S Lock error sometimes
|
90
|
+
# This is a trick to create internal vertica projection
|
91
|
+
query(jv, %[INSERT INTO #{quoted_schema}.#{quoted_temp_table} SELECT * FROM #{quoted_schema}.#{quoted_table} LIMIT 0])
|
92
|
+
end
|
87
93
|
Embulk.logger.trace {
|
88
94
|
result = query(jv, %[SELECT EXPORT_OBJECTS('', '#{task['schema']}.#{task['temp_table']}')])
|
89
95
|
# You can see `CREATE PROJECTION` if the table has a projection
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-vertica
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- eiji.sekiya
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-01-
|
12
|
+
date: 2016-01-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jvertica
|