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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a488f15b394471fe6e4c98d1198c02dbe4bec89
4
- data.tar.gz: 229360b29afbcc28baf790eed886235f8de9148e
3
+ metadata.gz: 2db4b28e6259edb2d4cacc084586ec82c876ccac
4
+ data.tar.gz: bbfe10034e08509f04e259293bde211543cdd1f1
5
5
  SHA512:
6
- metadata.gz: c63cd1b1ec03d8936131ef826c6949e610dd0930b29959ac5c433db7389e43aec235ae1aacc49a6b7280f2f388b08257bd79dc055d06660f91258f5027a97310
7
- data.tar.gz: 7c8f29c20455a5dca9b77d89a278728d8c9083ff95abb4f1a3f45587bcbbd03a3bb0cc37e8f37384dc4f1d2b9301de3cf61ad1aaa20c1e53b44e19ff0f67eff7
6
+ metadata.gz: 8ad723dfc4972dcc125026d10098b572baeac9f33e384a5f560674f4c322d34185e168723584e287e40461975d7f0fcd7856b2c7fd4f7d03ef1e506126d74281
7
+ data.tar.gz: f5b89412688b7609d2a54e2878d469ec946204df22f423d3cf0108b26324559f2791a9509192981f6c937cff8221e948bbb883253a2da396e2ec8f145125a06e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.3.1 (2015/11/20)
2
+
3
+ Fixes:
4
+
5
+ * Fix timezone support for the case that column_options is not specified (use default_timezone)
6
+
1
7
  # 0.3.0 (2015/11/17)
2
8
 
3
9
  Changes:
data/Gemfile CHANGED
@@ -3,5 +3,6 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
  gem 'embulk'
5
5
  gem 'embulk-input-random'
6
+ gem 'embulk-filter-stdout'
6
7
  gem 'pry'
7
8
  gem 'pry-nav'
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "embulk-output-vertica"
3
- spec.version = "0.3.0"
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, Proc.new {|val| val }]
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
- @timestamp_format = timestamp_format
33
- @timezone = timezone
34
- @zone_offset = get_zone_offset(@timezone)
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.0
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-18 00:00:00.000000000 Z
12
+ date: 2015-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jvertica