embulk-output-vertica 0.3.0 → 0.3.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/Gemfile +1 -0
- data/embulk-output-vertica.gemspec +1 -1
- data/lib/embulk/output/vertica/value_converter_factory.rb +6 -4
- data/lib/embulk/output/vertica.rb +2 -2
- 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: 2db4b28e6259edb2d4cacc084586ec82c876ccac
|
4
|
+
data.tar.gz: bbfe10034e08509f04e259293bde211543cdd1f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ad723dfc4972dcc125026d10098b572baeac9f33e384a5f560674f4c322d34185e168723584e287e40461975d7f0fcd7856b2c7fd4f7d03ef1e506126d74281
|
7
|
+
data.tar.gz: f5b89412688b7609d2a54e2878d469ec946204df22f423d3cf0108b26324559f2791a9509192981f6c937cff8221e948bbb883253a2da396e2ec8f145125a06e
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "embulk-output-vertica"
|
3
|
-
spec.version = "0.3.
|
3
|
+
spec.version = "0.3.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"
|
@@ -21,7 +21,7 @@ module Embulk
|
|
21
21
|
timezone = column_options[column_name]['timezone'] || default_timezone
|
22
22
|
[column_name, self.new(schema_type, value_type, timestamp_format, timezone).create_converter]
|
23
23
|
else
|
24
|
-
[column_name,
|
24
|
+
[column_name, self.new(schema_type, nil, nil, default_timezone).create_converter]
|
25
25
|
end
|
26
26
|
end]
|
27
27
|
end
|
@@ -29,9 +29,11 @@ module Embulk
|
|
29
29
|
def initialize(schema_type, value_type = nil, timestamp_format = nil, timezone = nil)
|
30
30
|
@schema_type = schema_type
|
31
31
|
@value_type = value_type || schema_type.to_s
|
32
|
-
@
|
33
|
-
|
34
|
-
|
32
|
+
if @schema_type == :timestamp || @value_type == 'timestamp'
|
33
|
+
@timestamp_format = timestamp_format
|
34
|
+
@timezone = timezone
|
35
|
+
@zone_offset = get_zone_offset(@timezone) if @timezone
|
36
|
+
end
|
35
37
|
end
|
36
38
|
|
37
39
|
def create_converter
|
@@ -80,7 +80,7 @@ module Embulk
|
|
80
80
|
connect(task) do |jv|
|
81
81
|
# clean up the temp table
|
82
82
|
query(jv, %[DROP TABLE IF EXISTS #{quoted_schema}.#{quoted_temp_table}])
|
83
|
-
Embulk.logger.debug { "embulk-output-vertica: #{query(jv, %[SELECT * FROM #{quoted_schema}.#{quoted_table} LIMIT 10]).map {|row| row.to_h }.join("\n") rescue nil}" }
|
83
|
+
Embulk.logger.debug { "embulk-output-vertica: select result #{query(jv, %[SELECT * FROM #{quoted_schema}.#{quoted_table} LIMIT 10]).map {|row| row.to_h }.join("\n") rescue nil}" }
|
84
84
|
end
|
85
85
|
end
|
86
86
|
# this is for -o next_config option, add some paramters for next time execution if wants
|
@@ -108,7 +108,7 @@ module Embulk
|
|
108
108
|
num_output_rows, rejects = copy(@jv, copy_sql) do |stdin|
|
109
109
|
page.each do |record|
|
110
110
|
json = to_json(record)
|
111
|
-
Embulk.logger.debug { "embulk-output-vertica: #{json}" }
|
111
|
+
Embulk.logger.debug { "embulk-output-vertica: to_json #{json}" }
|
112
112
|
stdin << json << "\n"
|
113
113
|
@num_input_rows += 1
|
114
114
|
end
|
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.3.
|
4
|
+
version: 0.3.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-11-
|
12
|
+
date: 2015-11-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jvertica
|