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.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/appveyor.yml +8 -0
  4. data/build.gradle +86 -45
  5. data/embulk-core/src/main/java/org/embulk/config/TaskValidationException.java +1 -1
  6. data/embulk-core/src/main/java/org/embulk/exec/SamplingParserPlugin.java +43 -4
  7. data/embulk-core/src/main/java/org/embulk/spi/PageBuilder.java +15 -0
  8. data/embulk-core/src/main/java/org/embulk/spi/util/ResumableInputStream.java +38 -1
  9. data/embulk-docs/src/built-in.rst +34 -0
  10. data/embulk-docs/src/release.rst +1 -0
  11. data/embulk-docs/src/release/release-0.8.16.rst +43 -0
  12. data/embulk-standards/build.gradle +1 -0
  13. data/embulk-standards/src/main/java/org/embulk/standards/RemoveColumnsFilterPlugin.java +268 -0
  14. data/embulk-standards/src/main/java/org/embulk/standards/RenameFilterPlugin.java +13 -0
  15. data/embulk-standards/src/main/java/org/embulk/standards/StandardPluginModule.java +1 -0
  16. data/embulk-standards/src/test/java/org/embulk/standards/TestRemoveColumnsFilterPlugin.java +121 -0
  17. data/embulk-standards/src/test/java/org/embulk/standards/TestRenameFilterPlugin.java +8 -0
  18. data/embulk-standards/src/test/java/org/embulk/standards/guess/TestCsvAllStringsGuessPlugin.java +38 -0
  19. data/embulk-standards/src/test/java/org/embulk/standards/guess/TestCsvGuessPlugin.java +229 -0
  20. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row.csv +1 -0
  21. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header.csv +2 -0
  22. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header_guessed.yml +12 -0
  23. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_and_header_seed.yml +1 -0
  24. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_guessed.yml +12 -0
  25. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_int_single_column_row_seed.yml +1 -0
  26. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows.csv +1 -0
  27. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header.csv +2 -0
  28. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_guessed.yml +16 -0
  29. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_seed.yml +1 -0
  30. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed.csv +2 -0
  31. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed_guessed.yml +16 -0
  32. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_and_header_with_trim_needed_seed.yml +1 -0
  33. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_guessed.yml +16 -0
  34. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_seed.yml +1 -0
  35. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed.csv +1 -0
  36. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed_guessed.yml +16 -0
  37. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_rows_with_trim_needed_seed.yml +1 -0
  38. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row.csv +1 -0
  39. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header.csv +2 -0
  40. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header_guessed.yml +12 -0
  41. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_and_header_seed.yml +1 -0
  42. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_guessed.yml +12 -0
  43. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_1_string_single_column_row_seed.yml +1 -0
  44. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows.csv +2 -0
  45. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows_guessed.yml +12 -0
  46. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_int_single_column_rows_seed.yml +1 -0
  47. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows.csv +2 -0
  48. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header.csv +3 -0
  49. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header_guessed.yml +16 -0
  50. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_and_header_seed.yml +1 -0
  51. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_guessed.yml +16 -0
  52. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_rows_seed.yml +1 -0
  53. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows.csv +2 -0
  54. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows_guessed.yml +12 -0
  55. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_2_string_single_column_rows_seed.yml +1 -0
  56. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape.csv +5 -0
  57. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape_guessed.yml +17 -0
  58. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_backslash_escape_seed.yml +1 -0
  59. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column.csv +4 -0
  60. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_guessed.yml +12 -0
  61. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_seed.yml +1 -0
  62. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header.csv +5 -0
  63. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header_guessed.yml +12 -0
  64. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_int_single_column_with_header_seed.yml +1 -0
  65. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter.csv +5 -0
  66. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter_guessed.yml +17 -0
  67. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_semicolon_delimiter_seed.yml +1 -0
  68. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple.csv +5 -0
  69. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_guessed.yml +17 -0
  70. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_simple_seed.yml +1 -0
  71. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote.csv +5 -0
  72. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote_guessed.yml +17 -0
  73. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_single_quote_seed.yml +1 -0
  74. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column.csv +4 -0
  75. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_guessed.yml +12 -0
  76. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_seed.yml +1 -0
  77. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header.csv +5 -0
  78. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header_guessed.yml +12 -0
  79. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_string_single_column_with_header_seed.yml +1 -0
  80. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter.csv +4 -0
  81. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter_guessed.yml +16 -0
  82. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv/test/test_tab_delimiter_seed.yml +1 -0
  83. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple.csv +5 -0
  84. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple_guessed.yml +17 -0
  85. data/embulk-standards/src/test/resources/org/embulk/standards/guess/csv_all_strings/test/test_simple_seed.yml +1 -0
  86. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep.csv +5 -0
  87. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_expected.csv +4 -0
  88. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_filter.yml +2 -0
  89. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_in.yml +18 -0
  90. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names.csv +5 -0
  91. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names.yml +2 -0
  92. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names_expected.csv +4 -0
  93. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_duplicated_column_names_in.yml +17 -0
  94. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_with_unmatched_filter.yml +3 -0
  95. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_keep_without_unmatched_filter.yml +2 -0
  96. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove.csv +5 -0
  97. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_expected.csv +4 -0
  98. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_filter.yml +2 -0
  99. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_in.yml +18 -0
  100. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_with_unmatched_filter.yml +3 -0
  101. data/embulk-standards/src/test/resources/org/embulk/standards/remove_columns/test/test_remove_without_unmatched_filter.yml +2 -0
  102. data/embulk-test/src/main/java/org/embulk/test/TestingEmbulk.java +458 -28
  103. data/gradle/wrapper/gradle-wrapper.jar +0 -0
  104. data/gradle/wrapper/gradle-wrapper.properties +2 -2
  105. data/gradlew +30 -21
  106. data/gradlew.bat +4 -10
  107. data/lib/embulk/command/embulk_migrate_plugin.rb +2 -2
  108. data/lib/embulk/data/new/java/build.gradle.erb +5 -3
  109. data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.jar +0 -0
  110. data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.properties +2 -2
  111. data/lib/embulk/data/new/java/gradlew +30 -21
  112. data/lib/embulk/data/new/java/gradlew.bat +4 -10
  113. data/lib/embulk/guess/csv.rb +44 -22
  114. data/lib/embulk/guess/newline.rb +10 -4
  115. data/lib/embulk/guess_plugin.rb +3 -1
  116. data/lib/embulk/java/time_helper.rb +2 -2
  117. data/lib/embulk/version.rb +1 -1
  118. metadata +92 -5
@@ -0,0 +1,12 @@
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}
@@ -0,0 +1,2 @@
1
+ 1,32864,2015-01-27 19:23:49,20150127,embulk
2
+ 2,14824,2015-01-27 19:01:23,20150127,embulk jruby
@@ -0,0 +1,3 @@
1
+ id,account,time,purchase,comment
2
+ 1,32864,2015-01-27 19:23:49,20150127,embulk
3
+ 2,14824,2015-01-27 19:01:23,20150127,embulk jruby
@@ -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,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}
@@ -0,0 +1,2 @@
1
+ ac97447f-146c-4d6c-914e-c283bb165804
2
+ fad3bfe5-88eb-48b0-ace0-12e85946e1d7
@@ -0,0 +1,12 @@
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: string}
@@ -0,0 +1,5 @@
1
+ id,account,time,purchase,comment
2
+ 1,32864,2015-01-27 19:23:49,20150127,embulk
3
+ 2,14824,2015-01-27 19:01:23,20150127,embulk jruby
4
+ 3,27559,2015-01-28 02:20:02,20150128,"Embulk \"csv\" parser plugin"
5
+ 4,11270,2015-01-29 11:54:36,20150129,NULL
@@ -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,12 @@
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}
@@ -0,0 +1,12 @@
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}
@@ -0,0 +1,5 @@
1
+ id;account;time;purchase;comment
2
+ 1;32864;2015-01-27 19:23:49;20150127;embulk
3
+ 2;14824;2015-01-27 19:01:23;20150127;embulk jruby
4
+ 3;27559;2015-01-28 02:20:02;20150128;"Embulk ""csv"" parser plugin"
5
+ 4;11270;2015-01-29 11:54:36;20150129;NULL
@@ -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,5 @@
1
+ id,account,time,purchase,comment
2
+ 1,32864,2015-01-27 19:23:49,20150127,embulk
3
+ 2,14824,2015-01-27 19:01:23,20150127,embulk jruby
4
+ 3,27559,2015-01-28 02:20:02,20150128,"Embulk ""csv"" parser plugin"
5
+ 4,11270,2015-01-29 11:54:36,20150129,NULL
@@ -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,5 @@
1
+ id,account,time,purchase,comment
2
+ 1,32864,2015-01-27 19:23:49,20150127,embulk
3
+ 2,14824,2015-01-27 19:01:23,20150127,embulk jruby
4
+ 3,27559,2015-01-28 02:20:02,20150128,'Embulk "'csv"' parser plugin'
5
+ 4,11270,2015-01-29 11:54:36,20150129,NULL
@@ -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,4 @@
1
+ ac97447f-146c-4d6c-914e-c283bb165804
2
+ fad3bfe5-88eb-48b0-ace0-12e85946e1d7
3
+ 062003b0-a410-43b5-b530-ccfb8a117e77
4
+ daa6d312-bccb-44d0-8171-1bb8a21f6721
@@ -0,0 +1,12 @@
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: string}
@@ -0,0 +1,5 @@
1
+ id
2
+ ac97447f-146c-4d6c-914e-c283bb165804
3
+ fad3bfe5-88eb-48b0-ace0-12e85946e1d7
4
+ 062003b0-a410-43b5-b530-ccfb8a117e77
5
+ daa6d312-bccb-44d0-8171-1bb8a21f6721
@@ -0,0 +1,12 @@
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: string}
@@ -0,0 +1,4 @@
1
+ 1 32864 2015-01-27 19:23:49 20150127 embulk
2
+ 2 14824 2015-01-27 19:01:23 20150127 embulk jruby
3
+ 3 27559 2015-01-28 02:20:02 20150128 Embulk "csv" parser plugin
4
+ 4 11270 2015-01-29 11:54:36 20150129 NULL
@@ -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,5 @@
1
+ id,account,time,purchase,comment
2
+ 1,32864,2015-01-27 19:23:49,20150127,embulk
3
+ 2,14824,2015-01-27 19:01:23,20150127,embulk jruby
4
+ 3,27559,2015-01-28 02:20:02,20150128,"Embulk ""csv"" parser plugin"
5
+ 4,11270,2015-01-29 11:54:36,20150129,NULL
@@ -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,5 @@
1
+ id,account,time,purchase,comment
2
+ 1,32864,2015-01-27 19:23:49,20150127,embulk
3
+ 2,14824,2015-01-27 19:01:23,20150127,embulk jruby
4
+ 3,27559,2015-01-28 02:20:02,20150128,"Embulk ""csv"" parser plugin"
5
+ 4,11270,2015-01-29 11:54:36,20150129,NULL
@@ -0,0 +1,4 @@
1
+ 1,32864,20150127
2
+ 2,14824,20150127
3
+ 3,27559,20150128
4
+ 4,11270,20150129
@@ -0,0 +1,2 @@
1
+ type: remove_columns
2
+ keep: [id, account, purchase]
@@ -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,5 @@
1
+ id,id,comment,id
2
+ 1,32864,a,k1
3
+ 2,14824,b,k2
4
+ 3,27559,c,k3
5
+ 4,11270,d,k4
@@ -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}
@@ -0,0 +1,3 @@
1
+ type: remove_columns
2
+ keep: [invalid, id, account, purchase]
3
+ accept_unmatched_columns: true
@@ -0,0 +1,2 @@
1
+ type: remove_columns
2
+ keep: [invalid, id, account, purchase]
@@ -0,0 +1,5 @@
1
+ id,account,time,purchase,comment
2
+ 1,32864,2015-01-27 19:23:49,20150127,embulk
3
+ 2,14824,2015-01-27 19:01:23,20150127,embulk jruby
4
+ 3,27559,2015-01-28 02:20:02,20150128,"Embulk ""csv"" parser plugin"
5
+ 4,11270,2015-01-29 11:54:36,20150129,NULL