embulk 0.8.15-java → 0.8.16-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/appveyor.yml +8 -0
- data/build.gradle +86 -45
- data/embulk-core/src/main/java/org/embulk/config/TaskValidationException.java +1 -1
- data/embulk-core/src/main/java/org/embulk/exec/SamplingParserPlugin.java +43 -4
- data/embulk-core/src/main/java/org/embulk/spi/PageBuilder.java +15 -0
- data/embulk-core/src/main/java/org/embulk/spi/util/ResumableInputStream.java +38 -1
- data/embulk-docs/src/built-in.rst +34 -0
- data/embulk-docs/src/release.rst +1 -0
- data/embulk-docs/src/release/release-0.8.16.rst +43 -0
- data/embulk-standards/build.gradle +1 -0
- data/embulk-standards/src/main/java/org/embulk/standards/RemoveColumnsFilterPlugin.java +268 -0
- data/embulk-standards/src/main/java/org/embulk/standards/RenameFilterPlugin.java +13 -0
- data/embulk-standards/src/main/java/org/embulk/standards/StandardPluginModule.java +1 -0
- data/embulk-standards/src/test/java/org/embulk/standards/TestRemoveColumnsFilterPlugin.java +121 -0
- data/embulk-standards/src/test/java/org/embulk/standards/TestRenameFilterPlugin.java +8 -0
- data/embulk-standards/src/test/java/org/embulk/standards/guess/TestCsvAllStringsGuessPlugin.java +38 -0
- data/embulk-standards/src/test/java/org/embulk/standards/guess/TestCsvGuessPlugin.java +229 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row.csv +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header.csv +2 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header_guessed.yml +12 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_guessed.yml +12 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows.csv +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header.csv +2 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_guessed.yml +16 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed.csv +2 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed_guessed.yml +16 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_guessed.yml +16 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed.csv +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed_guessed.yml +16 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row.csv +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header.csv +2 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header_guessed.yml +12 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_guessed.yml +12 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows.csv +2 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows_guessed.yml +12 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows.csv +2 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header.csv +3 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header_guessed.yml +16 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_guessed.yml +16 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows.csv +2 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows_guessed.yml +12 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape.csv +5 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape_guessed.yml +17 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column.csv +4 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_guessed.yml +12 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header.csv +5 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header_guessed.yml +12 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter.csv +5 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter_guessed.yml +17 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple.csv +5 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_guessed.yml +17 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote.csv +5 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote_guessed.yml +17 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column.csv +4 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_guessed.yml +12 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header.csv +5 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header_guessed.yml +12 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter.csv +4 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter_guessed.yml +16 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple.csv +5 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple_guessed.yml +17 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple_seed.yml +1 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep.csv +5 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_expected.csv +4 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_filter.yml +2 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_in.yml +18 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names.csv +5 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names.yml +2 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names_expected.csv +4 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names_in.yml +17 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_unmatched_filter.yml +3 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_without_unmatched_filter.yml +2 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove.csv +5 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_expected.csv +4 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_filter.yml +2 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_in.yml +18 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_with_unmatched_filter.yml +3 -0
- data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_without_unmatched_filter.yml +2 -0
- data/embulk-test/src/main/java/org/embulk/test/TestingEmbulk.java +458 -28
- data/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/gradle/wrapper/gradle-wrapper.properties +2 -2
- data/gradlew +30 -21
- data/gradlew.bat +4 -10
- data/lib/embulk/command/embulk_migrate_plugin.rb +2 -2
- data/lib/embulk/data/new/java/build.gradle.erb +5 -3
- data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.properties +2 -2
- data/lib/embulk/data/new/java/gradlew +30 -21
- data/lib/embulk/data/new/java/gradlew.bat +4 -10
- data/lib/embulk/guess/csv.rb +44 -22
- data/lib/embulk/guess/newline.rb +10 -4
- data/lib/embulk/guess_plugin.rb +3 -1
- data/lib/embulk/java/time_helper.rb +2 -2
- data/lib/embulk/version.rb +1 -1
- metadata +92 -5
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
charset: UTF-8
|
2
|
+
newline: LF
|
3
|
+
type: csv
|
4
|
+
delimiter: ','
|
5
|
+
quote: '"'
|
6
|
+
escape: '"'
|
7
|
+
trim_if_not_quoted: false
|
8
|
+
skip_header_lines: 1
|
9
|
+
allow_extra_columns: false
|
10
|
+
allow_optional_columns: false
|
11
|
+
columns:
|
12
|
+
- {name: id, type: long}
|
13
|
+
- {name: account, type: long}
|
14
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
15
|
+
- {name: purchase, type: timestamp, format: '%Y%m%d'}
|
16
|
+
- {name: comment, type: string}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_guessed.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
charset: UTF-8
|
2
|
+
newline: LF
|
3
|
+
type: csv
|
4
|
+
delimiter: ','
|
5
|
+
quote: '"'
|
6
|
+
escape: '"'
|
7
|
+
trim_if_not_quoted: false
|
8
|
+
skip_header_lines: 0
|
9
|
+
allow_extra_columns: false
|
10
|
+
allow_optional_columns: false
|
11
|
+
columns:
|
12
|
+
- {name: c0, type: long}
|
13
|
+
- {name: c1, type: long}
|
14
|
+
- {name: c2, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
15
|
+
- {name: c3, type: timestamp, format: '%Y%m%d'}
|
16
|
+
- {name: c4, type: string}
|
data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_seed.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
charset: UTF-8
|
2
|
+
newline: LF
|
3
|
+
type: csv
|
4
|
+
delimiter: ','
|
5
|
+
quote: '"'
|
6
|
+
escape: "\\"
|
7
|
+
null_string: "NULL"
|
8
|
+
trim_if_not_quoted: false
|
9
|
+
skip_header_lines: 1
|
10
|
+
allow_extra_columns: false
|
11
|
+
allow_optional_columns: false
|
12
|
+
columns:
|
13
|
+
- {name: id, type: long}
|
14
|
+
- {name: account, type: long}
|
15
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
16
|
+
- {name: purchase, type: timestamp, format: '%Y%m%d'}
|
17
|
+
- {name: comment, type: string}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
charset: UTF-8
|
2
|
+
newline: LF
|
3
|
+
type: csv
|
4
|
+
delimiter: ';'
|
5
|
+
quote: '"'
|
6
|
+
escape: '"'
|
7
|
+
null_string: "NULL"
|
8
|
+
trim_if_not_quoted: false
|
9
|
+
skip_header_lines: 1
|
10
|
+
allow_extra_columns: false
|
11
|
+
allow_optional_columns: false
|
12
|
+
columns:
|
13
|
+
- {name: id, type: long}
|
14
|
+
- {name: account, type: long}
|
15
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
16
|
+
- {name: purchase, type: timestamp, format: '%Y%m%d'}
|
17
|
+
- {name: comment, type: string}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_guessed.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
charset: UTF-8
|
2
|
+
newline: LF
|
3
|
+
type: csv
|
4
|
+
delimiter: ','
|
5
|
+
quote: '"'
|
6
|
+
escape: '"'
|
7
|
+
null_string: "NULL"
|
8
|
+
trim_if_not_quoted: false
|
9
|
+
skip_header_lines: 1
|
10
|
+
allow_extra_columns: false
|
11
|
+
allow_optional_columns: false
|
12
|
+
columns:
|
13
|
+
- {name: id, type: long}
|
14
|
+
- {name: account, type: long}
|
15
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
16
|
+
- {name: purchase, type: timestamp, format: '%Y%m%d'}
|
17
|
+
- {name: comment, type: string}
|
data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_seed.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
charset: UTF-8
|
2
|
+
newline: LF
|
3
|
+
type: csv
|
4
|
+
delimiter: ','
|
5
|
+
quote: "'"
|
6
|
+
escape: '"'
|
7
|
+
null_string: "NULL"
|
8
|
+
trim_if_not_quoted: false
|
9
|
+
skip_header_lines: 1
|
10
|
+
allow_extra_columns: false
|
11
|
+
allow_optional_columns: false
|
12
|
+
columns:
|
13
|
+
- {name: id, type: long}
|
14
|
+
- {name: account, type: long}
|
15
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
16
|
+
- {name: purchase, type: timestamp, format: '%Y%m%d'}
|
17
|
+
- {name: comment, type: string}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
type: csv
|
2
|
+
charset: UTF-8
|
3
|
+
newline: LF
|
4
|
+
delimiter: "\t"
|
5
|
+
quote: null
|
6
|
+
null_string: "NULL"
|
7
|
+
trim_if_not_quoted: false
|
8
|
+
skip_header_lines: 0
|
9
|
+
allow_extra_columns: false
|
10
|
+
allow_optional_columns: false
|
11
|
+
columns:
|
12
|
+
- {name: c0, type: long}
|
13
|
+
- {name: c1, type: long}
|
14
|
+
- {name: c2, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
15
|
+
- {name: c3, type: timestamp, format: '%Y%m%d'}
|
16
|
+
- {name: c4, type: string}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
charset: UTF-8
|
2
|
+
newline: LF
|
3
|
+
type: csv
|
4
|
+
delimiter: ','
|
5
|
+
quote: '"'
|
6
|
+
escape: '"'
|
7
|
+
null_string: "NULL"
|
8
|
+
trim_if_not_quoted: false
|
9
|
+
skip_header_lines: 1
|
10
|
+
allow_extra_columns: false
|
11
|
+
allow_optional_columns: false
|
12
|
+
columns:
|
13
|
+
- {name: id, type: string}
|
14
|
+
- {name: account, type: string}
|
15
|
+
- {name: time, type: string}
|
16
|
+
- {name: purchase, type: string}
|
17
|
+
- {name: comment, type: string}
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_in.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
type: file
|
2
|
+
parser:
|
3
|
+
charset: UTF-8
|
4
|
+
newline: CRLF
|
5
|
+
type: csv
|
6
|
+
delimiter: ','
|
7
|
+
quote: '"'
|
8
|
+
escape: '"'
|
9
|
+
trim_if_not_quoted: false
|
10
|
+
skip_header_lines: 1
|
11
|
+
allow_extra_columns: false
|
12
|
+
allow_optional_columns: false
|
13
|
+
columns:
|
14
|
+
- {name: id, type: long}
|
15
|
+
- {name: account, type: long}
|
16
|
+
- {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
|
17
|
+
- {name: purchase, type: string}
|
18
|
+
- {name: comment, type: string}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
type: file
|
2
|
+
parser:
|
3
|
+
charset: UTF-8
|
4
|
+
newline: CRLF
|
5
|
+
type: csv
|
6
|
+
delimiter: ','
|
7
|
+
quote: '"'
|
8
|
+
escape: '"'
|
9
|
+
trim_if_not_quoted: false
|
10
|
+
skip_header_lines: 1
|
11
|
+
allow_extra_columns: false
|
12
|
+
allow_optional_columns: false
|
13
|
+
columns:
|
14
|
+
- {name: id, type: long}
|
15
|
+
- {name: id, type: long}
|
16
|
+
- {name: comment, type: string}
|
17
|
+
- {name: id, type: string}
|