Advertisement
Guest User

Untitled

a guest
May 25th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1.  
  2. ```csv
  3. 1,32864,2015-01-27 19:23:49,20150127,embulk,hoge
  4. 2,14824,2015-01-27 19:01:23,20150127,"embulk, jruby",hoge
  5. 3,27559,2015-01-28 02:20:02,20150128,"Embulk ""csv"" parser plugin",hoge
  6. 4,11270,2015-01-29 11:54:36,20150129,NULL,hoge
  7. ```
  8.  
  9. ```json
  10. {"id":1,"account":32864,"time":"2015-01-28T04:23:49.000","purchase":"2015-01-27T09:00:00.000","comment":"embulk","hoge":"hoge"}
  11. {"id":2,"account":14824,"time":"2015-01-28T04:01:23.000","purchase":"2015-01-27T09:00:00.000","comment":"embulk, jruby","hoge":"hoge"}
  12. {"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"}
  13. {"id":4,"account":11270,"time":"2015-01-29T20:54:36.000","purchase":"2015-01-29T09:00:00.000","comment":"NULL","hoge":"hoge"}
  14. ```
  15.  
  16. ```
  17. in:
  18. type: file
  19. path_prefix: /private/tmp/hoge3/csv/sample_
  20. parser:
  21. charset: UTF-8
  22. newline: CRLF
  23. type: csv
  24. delimiter: ','
  25. quote: '"'
  26. escape: ''
  27. skip_header_lines: 1
  28. columns:
  29. - {name: id, type: long}
  30. - {name: account, type: long}
  31. - {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S'}
  32. - {name: purchase, type: timestamp, format: '%Y%m%d'}
  33. - {name: comment, type: string}
  34. - {name: hoge, type: string}
  35. exec: {}
  36. out:
  37. type: file
  38. formatter:
  39. type: jsonl
  40. date_format: "yyyy-MM-dd'T'HH:mm:ss.SSS"
  41. # date_format: "yyyy-MM-dd'T'HH:mm:ss.SSSX"
  42. timezone: "JST"
  43. path_prefix: /tmp/hoge4/test_
  44. file_ext: ".json"
  45. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement