embulk-output-vertica 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +2 -2
- data/embulk-output-vertica.gemspec +1 -1
- data/example.yml +1 -1
- data/lib/embulk/output/vertica.rb +11 -5
- 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: 48c16a813edf8f1379f84b3f26dd60003cf2d31e
|
4
|
+
data.tar.gz: 037817f190e9cda6fee9616ebd7609f646b6ada1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e22a0facffaaa48bf6f342cacfec900a76addc3260159bc8fd354a7feeaa3cf40031c94a6d64c281418cbe0b441e58a788e5be69c99dcf584ea45b6855e3ed37
|
7
|
+
data.tar.gz: 479dbb5a7edbc543c74616e87c679c55d66364e7092d0a024e18003d23a9033092aaf7baba5bef5ac7c893d1542fee2e684a26ca44b895bbab70fbb55d84807c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
- **host**: hostname (string, default: localhost)
|
13
13
|
- **port**: port number (integer, default: 5433)
|
14
|
-
- **
|
14
|
+
- **user**: user name (string, required)
|
15
15
|
- **password**: password (string, default: '')
|
16
16
|
- **database**: database name (string, default: vdb)
|
17
17
|
- **schema**: schema name (string, default: public)
|
@@ -52,7 +52,7 @@
|
|
52
52
|
out:
|
53
53
|
type: vertica
|
54
54
|
host: 127.0.0.1
|
55
|
-
|
55
|
+
user: dbadmin
|
56
56
|
password: xxxxxxx
|
57
57
|
database: vdb
|
58
58
|
schema: sandbox
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "embulk-output-vertica"
|
3
|
-
spec.version = "0.2.
|
3
|
+
spec.version = "0.2.4"
|
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"
|
data/example.yml
CHANGED
@@ -13,7 +13,8 @@ module Embulk
|
|
13
13
|
task = {
|
14
14
|
'host' => config.param('host', :string, :default => 'localhost'),
|
15
15
|
'port' => config.param('port', :integer, :default => 5433),
|
16
|
-
'
|
16
|
+
'user' => config.param('user', :string, :default => nil),
|
17
|
+
'username' => config.param('username', :string, :default => nil), # alias to :user for backward compatibility
|
17
18
|
'password' => config.param('password', :string, :default => ''),
|
18
19
|
'database' => config.param('database', :string, :default => 'vdb'),
|
19
20
|
'schema' => config.param('schema', :string, :default => 'public'),
|
@@ -26,12 +27,17 @@ module Embulk
|
|
26
27
|
'reject_on_materialized_type_error' => config.param('reject_on_materialized_type_error', :bool, :default => false),
|
27
28
|
}
|
28
29
|
|
30
|
+
task['user'] ||= task['username']
|
31
|
+
unless task['user']
|
32
|
+
raise ConfigError.new 'required field "user" is not set'
|
33
|
+
end
|
34
|
+
|
29
35
|
unless %w[INSERT REPLACE].include?(task['mode'].upcase!)
|
30
|
-
raise ConfigError
|
36
|
+
raise ConfigError.new "`mode` must be one of INSERT, REPLACE"
|
31
37
|
end
|
32
38
|
|
33
39
|
unless %w[AUTO DIRECT TRICKLE].include?(task['copy_mode'].upcase!)
|
34
|
-
raise ConfigError
|
40
|
+
raise ConfigError.new "`copy_mode` must be one of AUTO, DIRECT, TRICKLE"
|
35
41
|
end
|
36
42
|
|
37
43
|
now = Time.now
|
@@ -133,7 +139,7 @@ module Embulk
|
|
133
139
|
jv = ::Jvertica.connect({
|
134
140
|
host: task['host'],
|
135
141
|
port: task['port'],
|
136
|
-
user: task['
|
142
|
+
user: task['user'],
|
137
143
|
password: task['password'],
|
138
144
|
database: task['database'],
|
139
145
|
})
|
@@ -167,7 +173,7 @@ module Embulk
|
|
167
173
|
when :boolean then 'BOOLEAN'
|
168
174
|
when :long then 'INT' # BIGINT is a synonym for INT in vertica
|
169
175
|
when :double then 'FLOAT' # DOUBLE PRECISION is a synonym for FLOAT in vertica
|
170
|
-
when :string then 'VARCHAR' # LONG VARCHAR is not recommended
|
176
|
+
when :string then 'VARCHAR' # LONG VARCHAR is not recommended. Default is VARCHAR(80)
|
171
177
|
when :timestamp then 'TIMESTAMP'
|
172
178
|
else raise NotSupportedType, "embulk-output-vertica cannot take column type #{type}"
|
173
179
|
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.2.
|
4
|
+
version: 0.2.4
|
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-10-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jvertica
|