Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```csv
- 1,32864,2015-01-27 19:23:49,20150127,embulk,hoge
- 2,14824,2015-01-27 19:01:23,20150127,"embulk, jruby",hoge
- 3,27559,2015-01-28 02:20:02,20150128,"Embulk ""csv"" parser plugin",hoge
- 4,11270,2015-01-29 11:54:36,20150129,NULL,hoge
- ```
- ```json
- {"id":1,"account":32864,"time":"2015-01-28T04:23:49.000","purchase":"2015-01-27T09:00:00.000","comment":"embulk","hoge":"hoge"}
- {"id":2,"account":14824,"time":"2015-01-28T04:01:23.000","purchase":"2015-01-27T09:00:00.000","comment":"embulk, jruby","hoge":"hoge"}
- {"id":3,"account":27559,"time":"2015-01-28T11:20:02.000","purchase":"2015-01-28T09:00:00.000","comment":"Embulk \"csv\" parser plugin","hoge":"hoge"}
- {"id":4,"account":11270,"time":"2015-01-29T20:54:36.000","purchase":"2015-01-29T09:00:00.000","comment":"NULL","hoge":"hoge"}
- ```
- ```
- in:
- type: file
- path_prefix: /private/tmp/hoge3/csv/sample_
- parser:
- charset: UTF-8
- newline: CRLF
- type: csv
- delimiter: ','
- quote: '"'
- escape: ''
- skip_header_lines: 1
- columns:
- - {name: id, type: long}
- - {name: account, type: long}
- - {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
- - {name: purchase, type: timestamp, format: '%Y%m%d'}
- - {name: comment, type: string}
- - {name: hoge, type: string}
- exec: {}
- out:
- type: file
- formatter:
- type: jsonl
- date_format: "yyyy-MM-dd'T'HH:mm:ss.SSS"
- # date_format: "yyyy-MM-dd'T'HH:mm:ss.SSSX"
- timezone: "JST"
- path_prefix: /tmp/hoge4/test_
- file_ext: ".json"
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement