embulk 0.7.5 → 0.7.6
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-cli/src/main/sh/selfrun.sh +1 -1
- data/embulk-core/src/main/java/org/embulk/config/UserDataExceptions.java +1 -1
- data/embulk-docs/src/built-in.rst +28 -26
- data/embulk-docs/src/release.rst +1 -0
- data/embulk-docs/src/release/release-0.7.6.rst +18 -0
- data/embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java +2 -2
- data/embulk-standards/src/test/java/org/embulk/standards/TestCsvFormatterPlugin.java +4 -4
- data/lib/embulk/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29b4fbf4ef36c7354cf89e39b25212d5dbf6a0fa
|
4
|
+
data.tar.gz: 8e2387077d348272bf6e09736f51b48722b9287a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c39a0c665331889057cd4c2c74cfb7610f56dc1665c3e8e4fae8513f8a37f7dab7f463d68d814794b4a2b5a8401ca6ddbb366ade4ab0d2ef85a82d6f895776d6
|
7
|
+
data.tar.gz: 491c5c617a8868ac232fca6a7034263ef338e6213bca61806223acd10dd5a59a61e5fed8f09e86809bdc5c880906baf4122563d4c7187413a660a3d55eebf127
|
data/build.gradle
CHANGED
@@ -4,7 +4,7 @@ public class UserDataExceptions
|
|
4
4
|
{
|
5
5
|
private UserDataExceptions() { }
|
6
6
|
|
7
|
-
public boolean isUserDataException(Throwable exception)
|
7
|
+
public static boolean isUserDataException(Throwable exception)
|
8
8
|
{
|
9
9
|
while (exception != null) {
|
10
10
|
if (exception instanceof UserDataException) {
|
@@ -162,7 +162,7 @@ Options
|
|
162
162
|
+============================+==========+================================================================================================================+========================+
|
163
163
|
| delimiter | string | Delimiter character such as ``,`` for CSV, ``"\t"`` for TSV, ``"|"`` or any single-byte character | ``,`` by default |
|
164
164
|
+----------------------------+----------+----------------------------------------------------------------------------------------------------------------+------------------------+
|
165
|
-
| quote | string | The character surrounding a quoted value. Setting ``null`` disables quoting. |
|
165
|
+
| quote | string | The character surrounding a quoted value. Setting ``null`` disables quoting. | ``"`` by default |
|
166
166
|
+----------------------------+----------+----------------------------------------------------------------------------------------------------------------+------------------------+
|
167
167
|
| escape | string | Escape character to escape a special character. Setting ``null`` disables escaping. | ``\\`` by default |
|
168
168
|
+----------------------------+----------+----------------------------------------------------------------------------------------------------------------+------------------------+
|
@@ -319,31 +319,33 @@ The ``csv`` formatter plugin formats records using CSV or TSV format.
|
|
319
319
|
Options
|
320
320
|
~~~~~~~~~~~~~~~~~~
|
321
321
|
|
322
|
-
|
323
|
-
| name | type | description | required?
|
324
|
-
|
325
|
-
| delimiter | string | Delimiter character such as ``,`` for CSV, ``"\t"`` for TSV, ``"|"`` or any single-byte character | ``,`` by default
|
326
|
-
|
327
|
-
| quote | string | The character surrounding a quoted value |
|
328
|
-
|
329
|
-
| quote\_policy | enum | Policy for quote (ALL, MINIMAL, NONE) (see below) | ``MINIMAL`` by default
|
330
|
-
|
331
|
-
| escape | string | Escape character to escape
|
332
|
-
|
333
|
-
| header\_line | boolean | If true, write the header line with column name at the first line | ``true`` by default
|
334
|
-
|
335
|
-
| null_string | string | Expression of NULL values | empty by default
|
336
|
-
|
337
|
-
| newline | enum | Newline character (CRLF, LF or CR) | ``CRLF`` by default
|
338
|
-
|
339
|
-
| newline\_in\_field | enum | Newline character in each field (CRLF, LF, CR) | ``LF`` by default
|
340
|
-
|
341
|
-
| charset | enum | Character encoding (eg. ISO-8859-1, UTF-8) | ``UTF-8`` by default
|
342
|
-
|
343
|
-
| default\_timezone | string | Time zone of timestamp columns. This can be overwritten for each column using ``column_options`` | ``UTC`` by default
|
344
|
-
|
345
|
-
| column\_options | hash | See bellow | optional
|
346
|
-
|
322
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
323
|
+
| name | type | description | required? |
|
324
|
+
+======================+=========+=======================================================================================================+===============================+
|
325
|
+
| delimiter | string | Delimiter character such as ``,`` for CSV, ``"\t"`` for TSV, ``"|"`` or any single-byte character | ``,`` by default |
|
326
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
327
|
+
| quote | string | The character surrounding a quoted value | ``"`` by default |
|
328
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
329
|
+
| quote\_policy | enum | Policy for quote (ALL, MINIMAL, NONE) (see below) | ``MINIMAL`` by default |
|
330
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
331
|
+
| escape | string | Escape character to escape quote character | same with quote default (\*1) |
|
332
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
333
|
+
| header\_line | boolean | If true, write the header line with column name at the first line | ``true`` by default |
|
334
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
335
|
+
| null_string | string | Expression of NULL values | empty by default |
|
336
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
337
|
+
| newline | enum | Newline character (CRLF, LF or CR) | ``CRLF`` by default |
|
338
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
339
|
+
| newline\_in\_field | enum | Newline character in each field (CRLF, LF, CR) | ``LF`` by default |
|
340
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
341
|
+
| charset | enum | Character encoding (eg. ISO-8859-1, UTF-8) | ``UTF-8`` by default |
|
342
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
343
|
+
| default\_timezone | string | Time zone of timestamp columns. This can be overwritten for each column using ``column_options`` | ``UTC`` by default |
|
344
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
345
|
+
| column\_options | hash | See bellow | optional |
|
346
|
+
+----------------------+---------+-------------------------------------------------------------------------------------------------------+-------------------------------+
|
347
|
+
|
348
|
+
(\*1): if quote\_policy is NONE, ``quote`` option is ignored, and default ``escape`` is ``\``.
|
347
349
|
|
348
350
|
The ``quote_policy`` option is used to determine field type to quote.
|
349
351
|
|
data/embulk-docs/src/release.rst
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
Release 0.7.6
|
2
|
+
==================================
|
3
|
+
|
4
|
+
General Changes
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* On Cygwin/Windows environment, embulk command returns exit code 1 correctly if a transaction fails (@hishidama++)
|
8
|
+
|
9
|
+
|
10
|
+
Built-in plugins
|
11
|
+
------------------
|
12
|
+
|
13
|
+
* ``formatter-csv``: fixed a problem where a ``"`` character is escaped when ``quote_plicy: NONE`` is set. The fixed behavior is that, if ``quote_plicy: NONE`` is set, ``quote`` option (which means ``"`` character) is completely ignored, and only newline and delimiter are escaped ([#327] @sonots++).
|
14
|
+
|
15
|
+
|
16
|
+
Release Date
|
17
|
+
------------------
|
18
|
+
2015-10-27
|
@@ -108,7 +108,7 @@ public class CsvFormatterPlugin
|
|
108
108
|
final char delimiter = task.getDelimiterChar();
|
109
109
|
final QuotePolicy quotePolicy = task.getQuotePolicy();
|
110
110
|
final char quote = task.getQuoteChar() != '\0' ? task.getQuoteChar() : '"';
|
111
|
-
final char escape = task.getEscapeChar().or(quotePolicy == QuotePolicy.NONE ? '\\' :
|
111
|
+
final char escape = task.getEscapeChar().or(quotePolicy == QuotePolicy.NONE ? '\\' : quote);
|
112
112
|
final String newlineInField = task.getNewlineInField().getString();
|
113
113
|
final String nullString = task.getNullString();
|
114
114
|
|
@@ -235,7 +235,7 @@ public class CsvFormatterPlugin
|
|
235
235
|
for (int i = 0; i < v.length(); i++) {
|
236
236
|
char c = v.charAt(i);
|
237
237
|
|
238
|
-
if (c == quote) {
|
238
|
+
if (policy != QuotePolicy.NONE && c == quote) {
|
239
239
|
escapedValue.append(escape);
|
240
240
|
escapedValue.append(c);
|
241
241
|
isRequireQuote = true;
|
@@ -194,7 +194,7 @@ public class TestCsvFormatterPlugin
|
|
194
194
|
|
195
195
|
char delimiter = ',';
|
196
196
|
char quote = '"';
|
197
|
-
char escape = '
|
197
|
+
char escape = '\\';
|
198
198
|
CsvFormatterPlugin.QuotePolicy policy = CsvFormatterPlugin.QuotePolicy.NONE;
|
199
199
|
String newline = Newline.LF.getString();
|
200
200
|
String nullString = "";
|
@@ -211,10 +211,10 @@ public class TestCsvFormatterPlugin
|
|
211
211
|
ImmutableMap.of("expected", "0x4d2", "actual", "0x4d2"),
|
212
212
|
ImmutableMap.of("expected", "123L", "actual", "123L"),
|
213
213
|
ImmutableMap.of("expected", "3.141592", "actual", "3.141592"),
|
214
|
-
ImmutableMap.of("expected", "1
|
214
|
+
ImmutableMap.of("expected", "1\\,000", "actual", "1,000"),
|
215
215
|
ImmutableMap.of("expected", "ABC", "actual", "ABC"),
|
216
|
-
ImmutableMap.of("expected", "ABC\"
|
217
|
-
ImmutableMap.of("expected", "ABC
|
216
|
+
ImmutableMap.of("expected", "ABC\"DEF", "actual", "ABC\"DEF"),
|
217
|
+
ImmutableMap.of("expected", "ABC\\\nDEF", "actual", "ABC\nDEF"),
|
218
218
|
ImmutableMap.of("expected", "", "actual", ""),
|
219
219
|
ImmutableMap.of("expected", "NULL", "actual", "NULL"),
|
220
220
|
ImmutableMap.of("expected", "2015-01-01 12:01:01", "actual", "2015-01-01 12:01:01"),
|
data/lib/embulk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jruby-jars
|
@@ -121,8 +121,8 @@ files:
|
|
121
121
|
- classpath/bval-jsr303-0.5.jar
|
122
122
|
- classpath/commons-beanutils-core-1.8.3.jar
|
123
123
|
- classpath/commons-lang3-3.1.jar
|
124
|
-
- classpath/embulk-core-0.7.
|
125
|
-
- classpath/embulk-standards-0.7.
|
124
|
+
- classpath/embulk-core-0.7.6.jar
|
125
|
+
- classpath/embulk-standards-0.7.6.jar
|
126
126
|
- classpath/guava-18.0.jar
|
127
127
|
- classpath/guice-4.0.jar
|
128
128
|
- classpath/guice-multibindings-4.0.jar
|
@@ -425,6 +425,7 @@ files:
|
|
425
425
|
- embulk-docs/src/release/release-0.7.3.rst
|
426
426
|
- embulk-docs/src/release/release-0.7.4.rst
|
427
427
|
- embulk-docs/src/release/release-0.7.5.rst
|
428
|
+
- embulk-docs/src/release/release-0.7.6.rst
|
428
429
|
- embulk-standards/build.gradle
|
429
430
|
- embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java
|
430
431
|
- embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java
|