bricolage 5.9.4 → 5.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/jobclass/load.rb +1 -1
- data/jobclass/unload.rb +1 -1
- data/lib/bricolage/psqldatasource.rb +4 -0
- data/lib/bricolage/version.rb +1 -1
- 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: d298c8e43119cf5f27d6df68c346a9eb812a06dd
|
4
|
+
data.tar.gz: ac037a2c8679c0d4fc067c62aa3b521a998b2f7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7fa32d78ace8ead9816bcccb39d3c804189209ced4f925a32ad462426a2baddaa03b3bbedb7689e66ab0fa8fcc72106cc89146f9202da16856593a97e12c658
|
7
|
+
data.tar.gz: 65304d83ab743db4ea90eb30625bee6ee8813c5748eaa158fa26d7a813cd5ee49ba6a4d6d08fa3ffe4edc29d17f56c23e241f6a35d2895182665bf8d26a90f23
|
data/jobclass/load.rb
CHANGED
@@ -6,7 +6,7 @@ JobClass.define('load') {
|
|
6
6
|
params.add SrcFileParam.new
|
7
7
|
params.add DataSourceParam.new('sql', 'dest-ds', 'Target data source.')
|
8
8
|
params.add DestTableParam.new(optional: false)
|
9
|
-
params.add EnumParam.new('format', %w(tsv json), 'Data file format.', default: 'tsv')
|
9
|
+
params.add EnumParam.new('format', %w(tsv csv json), 'Data file format.', default: 'tsv')
|
10
10
|
params.add StringParam.new('jsonpath', 'PATH', 'jsonpath to specify columns of json format records', optional: true)
|
11
11
|
params.add KeyValuePairsParam.new('options', 'OPTIONS', 'Loader options.',
|
12
12
|
optional: true, default: PSQLLoadOptions.new,
|
data/jobclass/unload.rb
CHANGED
@@ -7,7 +7,7 @@ JobClass.define('unload') {
|
|
7
7
|
params.add SrcTableParam.new(optional: false)
|
8
8
|
params.add DataSourceParam.new('s3', 'dest-ds', 'Target data source (s3).')
|
9
9
|
params.add DestFileParam.new
|
10
|
-
params.add EnumParam.new('format', %w(tsv), 'Data file format.', default: 'tsv')
|
10
|
+
params.add EnumParam.new('format', %w(tsv csv), 'Data file format.', default: 'tsv')
|
11
11
|
params.add KeyValuePairsParam.new('options', 'OPTIONS', 'Loader options.',
|
12
12
|
optional: true, default: PSQLLoadOptions.new,
|
13
13
|
value_handler: lambda {|value, ctx, vars| PSQLLoadOptions.parse(value) })
|
@@ -323,6 +323,8 @@ module Bricolage
|
|
323
323
|
case fmt
|
324
324
|
when 'tsv'
|
325
325
|
%q(delimiter '\t')
|
326
|
+
when 'csv'
|
327
|
+
%q(delimiter ',')
|
326
328
|
when 'json'
|
327
329
|
jsonpath ? "json \'#{src_ds.url(jsonpath)}\'" : %q(json 'auto')
|
328
330
|
else
|
@@ -352,6 +354,8 @@ module Bricolage
|
|
352
354
|
case format
|
353
355
|
when 'tsv'
|
354
356
|
%q(delimiter '\t')
|
357
|
+
when 'csv'
|
358
|
+
%q(delimiter ',')
|
355
359
|
else
|
356
360
|
raise ParameterError, "unsupported format: #{fmt}"
|
357
361
|
end
|
data/lib/bricolage/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bricolage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.9.
|
4
|
+
version: 5.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minero Aoki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|