前提・実現したいこと
embulkを利用しFTPでファイルを取得し、取得したファイルをFTPで出力したいと考えております。
1つのファイルを取得し出力する際、2つのファイルに分割されてしまいます。
1つのファイルに出力したいのですが、設定方法等お気づきの点があればお教えいただけますと幸いです。
ファイル取得には「embulk-input-ftp」、ファイル出力には「embulk-output-ftp」のプラグインを利用しています。
実行環境の情報は以下になります。
マシンスペック:2vCPU、8GiB
OS : WindowsServer 2008 R2
java : openjdk version "1.8.0_212"
embulk : embulk 0.9.17
embulk-input-ftp : embulk-input-ftp-0.2.0
embulk-output-ftp : embulk-output-ftp-0.2.2
不足情報等あればお気軽に教えていただけますと助かります。
発生している問題・エラーメッセージ
取り込み対象のファイルと出力されるファイルは以下になります。
■取り込み対象のファイル(test_purchase_log_20180802.csv)
time,member_id,goods_id,ship_date,ammount,total 2019-03-18 22:41:22,0001,0001,2019-09-2,3,1000 2019-03-18 22:41:33,0002,0002,2019-09-2,3,1000 2019-03-18 22:41:44,0003,0003,2019-09-2,3,1000 2019-03-18 22:41:55,0001,0003,2019-09-2,1,1000 2019-03-18 22:42:11,0001,0002,2019-09-2,2,1000 2019-03-18 22:42:11,0002,0003,2019-09-2,3,1000
■出力されるファイル1(test000.00.csv)
time,member_id,goods_id,ship_date,ammount,total 2019-03-18 22:41:22.000000 +0000,0001,0001,2019-09-02 00:00:00.000000 +0000,3,1000 2019-03-18 22:41:33.000000 +0000,0002,0002,2019-09-02 00:00:00.000000 +0000,3,1000 2019-03-18 22:41:44.000000 +0000,0003,0003,2019-09-02 00:00:00.000000 +0000,3,1000 2019-03-18 22:41:55.000000 +0000,0001,0003,2019-09-02 00:00:00.000000 +0000,1,1000 2019-03-18 22:42:11.000000 +0000,0001,0002,2019-09-02 00:00:00.000000 +0000,2,1000 2019-03-18 22:42:11.000000 +0000,0002,0003,2019-09-02 00:00:00.000000 +0000,3,1000
■出力されるファイル2(test001.00.csv)
time,member_id,goods_id,ship_date,ammount,total
embulk設定ファイル
embulkの設定ファイルは以下になります。
yml.liquid
in: type: ftp host: xxxxx port: 21 user: xxxxx password: xxxxx path_prefix: /test_purchase_log parser: charset: UTF-8 newline: CRLF type: csv delimiter: ',' quote: '"' escape: '"' trim_if_not_quoted: false skip_header_lines: 1 allow_extra_columns: false allow_optional_columns: false columns: - {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'} - {name: member_id, type: string} - {name: goods_id, type: string} - {name: ship_date, type: timestamp, format: '%Y-%m-%d'} - {name: ammount, type: long} - {name: total, type: long} out: type: ftp host: xxxxx port: 21 user: xxxxx password: xxxxx path_prefix: test file_ext: csv formatter: {type: csv, header_line: true}
試したこと
・複数ファイルを入力にする場合は想定通りの動作となります。(inputファイル数=outputファイル数となります。)
・マシンスペックを1vCPU、4GiBにすると1つのファイルへ出力されます。
・マシンスペックを4vCPU、16GiBにすると4つのファイルへ分割されて出力されます。出力された4つのファイルは「test000.00.csv」と「test001.00.csv」、「test002.00.csv」、「test003.00.csv」が出力されます。
「test000.00.csv」と「test001.00.csv」は上記と同じファイルが出力され、「test002.00.csv」、「test003.00.csv」は「test001.00.csv」と同じファイルが出力されます。
まだ回答がついていません
会員登録して回答してみよう