embulk-output-vertica 0.4.0 → 0.4.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 +9 -0
- 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: dd4013fbcdb34ce19df2fe94eb19b226d92d6b83
|
4
|
+
data.tar.gz: 5e99ffef341da9c253a6f5b6420239c7e2000999
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dabf1e7a0a5b6767dbd7352c42e777b37012e3172ef46024cb515298f8b734a8e64aa6d0b685b7fa920e41821a9351183ab9a7764ecb0a0790cf0190055ff563
|
7
|
+
data.tar.gz: bc761f55280145dde00983580b960af45b03e50f4ce32f4a6338cc8154a7b76d7f78280657828f5780b60f2370987415d6d3ba678535814f6e75df875df18a67
|
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.4.
|
3
|
+
spec.version = "0.4.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"
|
@@ -84,6 +84,14 @@ module Embulk
|
|
84
84
|
connection_pool.with do |jv|
|
85
85
|
query(jv, %[DROP TABLE IF EXISTS #{quoted_schema}.#{quoted_temp_table}])
|
86
86
|
query(jv, %[CREATE TABLE #{quoted_schema}.#{quoted_temp_table} (#{sql_schema_temp_table})])
|
87
|
+
# Create internal vertica projection beforehand, otherwirse, parallel copies lock table to create a projection and we get S Lock error sometimes
|
88
|
+
# This is a trick to create internal vertica projection
|
89
|
+
query(jv, %[INSERT INTO #{quoted_schema}.#{quoted_temp_table} SELECT * FROM #{quoted_schema}.#{quoted_table} LIMIT 0])
|
90
|
+
Embulk.logger.trace {
|
91
|
+
result = query(jv, %[SELECT EXPORT_OBJECTS('', '#{task['schema']}.#{task['temp_table']}')])
|
92
|
+
# You can see `CREATE PROJECTION` if the table has a projection
|
93
|
+
"embulk-output-vertica: #{result.to_a.flatten}"
|
94
|
+
}
|
87
95
|
end
|
88
96
|
|
89
97
|
begin
|
@@ -119,6 +127,7 @@ module Embulk
|
|
119
127
|
return next_config_diff
|
120
128
|
end
|
121
129
|
|
130
|
+
# instance is created on each thread
|
122
131
|
def initialize(task, schema, index)
|
123
132
|
super
|
124
133
|
@converters = ValueConverterFactory.create_converters(schema, task['default_timezone'], task['column_options'])
|
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.4.
|
4
|
+
version: 0.4.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: 2015-
|
12
|
+
date: 2015-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jvertica
|