embulk 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/build.gradle +1 -1
- data/embulk-docs/src/release.rst +1 -0
- data/embulk-docs/src/release/release-0.6.4.rst +13 -0
- data/lib/embulk/guess/csv.rb +26 -15
- data/lib/embulk/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de4102fca39496965dc800236bce8dae92e68a9c
|
4
|
+
data.tar.gz: 637887dd9dc0ab4e7f1d886736fba913aee8ee4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4708b0f2cb6a7440d146605a1a50f67b1d52d1218f8f07b212eeb315f71befa2f1e08327e585277bbe55ca799aea7db65dc896f0c22eb6cb54aaaec03d9c4e77
|
7
|
+
data.tar.gz: c16df22dc21a912e86bc44289ec3741e803a20ef0cf19e5227467dc5f908d3043f6b6b8394d0696ba87e3ee4f8eb3b8465e9a8742164d5d47d8d154723975e26
|
data/build.gradle
CHANGED
data/embulk-docs/src/release.rst
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
Release 0.6.4
|
2
|
+
==================================
|
3
|
+
|
4
|
+
Built-in plugins
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* ``guess-csv`` keeps existent configurations such as ``null_string`` if they are already set.
|
8
|
+
* ``guess-csv`` skips line if a CSV file is broken rather than falling back to ad-hoc implementation which can't deal with quoted values.
|
9
|
+
* Fixed a problem where ``guess-csv`` can't handle quoted values (@y-ken++)
|
10
|
+
|
11
|
+
Release Date
|
12
|
+
------------------
|
13
|
+
2015-04-21
|
data/lib/embulk/guess/csv.rb
CHANGED
@@ -37,17 +37,23 @@ module Embulk
|
|
37
37
|
end
|
38
38
|
|
39
39
|
parser_config = config["parser"] || {}
|
40
|
-
parser_guessed = DataSource.new.merge({"type" => "csv", "delimiter" => delim})
|
40
|
+
parser_guessed = DataSource.new.merge(parser_config).merge({"type" => "csv", "delimiter" => delim})
|
41
41
|
|
42
|
-
|
43
|
-
|
42
|
+
unless parser_guessed.has_key?("quote")
|
43
|
+
quote = guess_quote(sample_lines, delim)
|
44
|
+
parser_guessed["quote"] = quote ? quote : ''
|
45
|
+
end
|
44
46
|
|
45
|
-
|
46
|
-
|
47
|
+
unless parser_guessed.has_key?("escape")
|
48
|
+
escape = guess_escape(sample_lines, delim, quote)
|
49
|
+
parser_guessed["escape"] = escape ? escape : ''
|
50
|
+
end
|
47
51
|
|
48
|
-
|
49
|
-
|
50
|
-
|
52
|
+
unless parser_guessed.has_key?("null_string")
|
53
|
+
null_string = guess_null_string(sample_lines, delim)
|
54
|
+
parser_guessed["null_string"] = null_string if null_string
|
55
|
+
# don't even set null_string to avoid confusion of null and 'null' in YAML format
|
56
|
+
end
|
51
57
|
|
52
58
|
sample_records = split_lines(parser_guessed, sample_lines, delim)
|
53
59
|
skip_header_lines = guess_skip_header_lines(sample_records)
|
@@ -102,14 +108,19 @@ module Embulk
|
|
102
108
|
rows = []
|
103
109
|
while tokenizer.nextFile
|
104
110
|
while tokenizer.nextRecord
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
111
|
+
begin
|
112
|
+
columns = []
|
113
|
+
while true
|
114
|
+
begin
|
115
|
+
columns << tokenizer.nextColumn
|
116
|
+
rescue org.embulk.standards.CsvTokenizer::TooFewColumnsException
|
117
|
+
rows << columns
|
118
|
+
break
|
119
|
+
end
|
112
120
|
end
|
121
|
+
rescue org.embulk.standards.CsvTokenizer::InvalidValueException
|
122
|
+
# TODO warning
|
123
|
+
tokenizer.skipCurrentLine
|
113
124
|
end
|
114
125
|
end
|
115
126
|
end
|
data/lib/embulk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -293,6 +293,7 @@ files:
|
|
293
293
|
- embulk-docs/src/release/release-0.6.1.rst
|
294
294
|
- embulk-docs/src/release/release-0.6.2.rst
|
295
295
|
- embulk-docs/src/release/release-0.6.3.rst
|
296
|
+
- embulk-docs/src/release/release-0.6.4.rst
|
296
297
|
- embulk-standards/build.gradle
|
297
298
|
- embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java
|
298
299
|
- embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java
|
@@ -398,8 +399,8 @@ files:
|
|
398
399
|
- classpath/bval-jsr303-0.5.jar
|
399
400
|
- classpath/commons-beanutils-core-1.8.3.jar
|
400
401
|
- classpath/commons-lang3-3.1.jar
|
401
|
-
- classpath/embulk-core-0.6.
|
402
|
-
- classpath/embulk-standards-0.6.
|
402
|
+
- classpath/embulk-core-0.6.4.jar
|
403
|
+
- classpath/embulk-standards-0.6.4.jar
|
403
404
|
- classpath/guava-18.0.jar
|
404
405
|
- classpath/guice-3.0.jar
|
405
406
|
- classpath/guice-multibindings-3.0.jar
|