{"action":"created","issue":{"url":"https://api.github.com/repos/embulk/embulk/issues/327","labels_url":"https://api.github.com/repos/embulk/embulk/issues/327/labels{/name}","comments_url":"https://api.github.com/repos/embulk/embulk/issues/327/comments","events_url":"https://api.github.com/repos/embulk/embulk/issues/327/events","html_url":"https://github.com/embulk/embulk/issues/327","id":113282061,"number":327,"title":"formatter-csv quotes my JSON field even quote_policy: NONE","user":{"login":"sonots","id":2290461,"avatar_url":"https://avatars.githubusercontent.com/u/2290461?v=3","gravatar_id":"","url":"https://api.github.com/users/sonots","html_url":"https://github.com/sonots","followers_url":"https://api.github.com/users/sonots/followers","following_url":"https://api.github.com/users/sonots/following{/other_user}","gists_url":"https://api.github.com/users/sonots/gists{/gist_id}","starred_url":"https://api.github.com/users/sonots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonots/subscriptions","organizations_url":"https://api.github.com/users/sonots/orgs","repos_url":"https://api.github.com/users/sonots/repos","events_url":"https://api.github.com/users/sonots/events{/privacy}","received_events_url":"https://api.github.com/users/sonots/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-26T04:07:46Z","updated_at":"2015-10-26T17:29:57Z","closed_at":null,"body":"sample.tsv\r\n\r\n```\r\na[TAB]b[TAB]c[TAB]{\"a\":1,\"b\":2}\r\n```\r\n\r\nsample.yml\r\n\r\n```\r\nin:\r\n  type: file\r\n  path_prefix: sample.tsv\r\n  parser:\r\n    type: csv\r\n    delimiter: \"\\t\"\r\n    quote: null\r\n    escape: null\r\n    columns:\r\n      - {name: column1, type: string}\r\n      - {name: column2, type: string}\r\n      - {name: column3, type: string}\r\n      - {name: column4, type: string}\r\nout:\r\n  type: file\r\n  path_prefix: '/tmp/sample.'\r\n  file_ext: 'csv'\r\n  overwrite: true\r\n  formatter:\r\n    type: csv\r\n    delimiter: \"\\t\"\r\n    quote_policy: NONE\r\n    header_line: false\r\n```\r\n\r\n/tmp/sample.000.00.csv becomes as\r\n\r\n```\r\na[TAB]b[TAB]c[TAB]{\\\"a\\\":1,\\\"b\\\":2}\r\n```"},"comment":{"url":"https://api.github.com/repos/embulk/embulk/issues/comments/151217524","html_url":"https://github.com/embulk/embulk/issues/327#issuecomment-151217524","issue_url":"https://api.github.com/repos/embulk/embulk/issues/327","id":151217524,"user":{"login":"sakama","id":155269,"avatar_url":"https://avatars.githubusercontent.com/u/155269?v=3","gravatar_id":"","url":"https://api.github.com/users/sakama","html_url":"https://github.com/sakama","followers_url":"https://api.github.com/users/sakama/followers","following_url":"https://api.github.com/users/sakama/following{/other_user}","gists_url":"https://api.github.com/users/sakama/gists{/gist_id}","starred_url":"https://api.github.com/users/sakama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakama/subscriptions","organizations_url":"https://api.github.com/users/sakama/orgs","repos_url":"https://api.github.com/users/sakama/repos","events_url":"https://api.github.com/users/sakama/events{/privacy}","received_events_url":"https://api.github.com/users/sakama/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T17:29:56Z","updated_at":"2015-10-26T17:29:56Z","body":"I implemented CSV formatter's quote and escape process at #168\r\n\r\nCurrently, behavior of quote_policy will be affected by quote parameter's value.\r\nI think if you set `quote: '0'`, your porpose can be achieved.\r\n\r\nType of quote parameter is char, so empty string or null at config.yml doesn't work.\r\n```yaml\r\nquote: ''\r\nquote: \r\n```\r\n\r\nSet `quote: '0'` means set empty char as quote.\r\n\r\nIf you set other char, '\"' will be set as quote character automatically at following line.\r\nhttps://github.com/embulk/embulk/blob/master/embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java#L110\r\n\r\n\r\n\r\nsample.yml for your sample.tsv\r\n```yaml\r\nin:\r\n  type: file\r\n  path_prefix: sample.tsv\r\n  parser:\r\n    type: csv\r\n    delimiter: \"\\t\"\r\n    quote: null\r\n    escape: null\r\n    columns:\r\n      - {name: column1, type: string}\r\n      - {name: column2, type: string}\r\n      - {name: column3, type: string}\r\n      - {name: column4, type: string}\r\nout:\r\n  type: file\r\n  path_prefix: '/tmp/sample.'\r\n  file_ext: 'csv'\r\n  overwrite: true\r\n  formatter:\r\n    type: csv\r\n    delimiter: \"\\t\"\r\n    quote_policy: NONE\r\n    quote: '0'\r\n    header_line: false\r\n```"}}