embulk-output-vertica 0.4.0 → 0.4.1

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: b178cb9ffe687570117d6aa8edfb55e7c77c446d
4
- data.tar.gz: 72195fdd08f4929162602381bcd79432545067c0
3
+ metadata.gz: dd4013fbcdb34ce19df2fe94eb19b226d92d6b83
4
+ data.tar.gz: 5e99ffef341da9c253a6f5b6420239c7e2000999
5
5
  SHA512:
6
- metadata.gz: 3f132dba10f45571d856cf33478b80f73c154413dd78268a43510461f24f223b04def25cada97e204b3053c6d2ebd09054a6d08816bfe4d26cf102b908ff5bc4
7
- data.tar.gz: 10fcde36ab57437e724b4e0eb63586fcb218b300d799875777b15ba4769e9e3402dc85cc3b77f882897fdc73515e258b2ce3e57261d79eb98d921b8bab226b7f
6
+ metadata.gz: dabf1e7a0a5b6767dbd7352c42e777b37012e3172ef46024cb515298f8b734a8e64aa6d0b685b7fa920e41821a9351183ab9a7764ecb0a0790cf0190055ff563
7
+ data.tar.gz: bc761f55280145dde00983580b960af45b03e50f4ce32f4a6338cc8154a7b76d7f78280657828f5780b60f2370987415d6d3ba678535814f6e75df875df18a67
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.4.1 (2015/12/04)
2
+
3
+ Fixes:
4
+
5
+ * Create internal vertica projection beforehand to avoid S Lock error
6
+
1
7
  # 0.4.0 (2015/11/24)
2
8
 
3
9
  Enhancements:
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "embulk-output-vertica"
3
- spec.version = "0.4.0"
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.0
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-11-24 00:00:00.000000000 Z
12
+ date: 2015-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jvertica