Unable to escape newline characters while exporting to CSV
suribabuox opened this issue · 1 comments
suribabuox commented
Hi,
Some of the values in the index have newline characters and while exporting those values its writing each record to two lines (if there is one newline character), So the output file looks broken.
I am using version 5.5.2
To replicate
insert value
curl -H "Content-Type: application/json" -X POST "<ip:port>/<index-name>/testtype/1" -d '{"source": "elasticsearch\n6+", "format": "csv"}'
export
es2csv -u <ip:port> -i <index-name> -q '*' -o tmp.csv --debug
output file will be
source,format
"elasticsearch
6+",csv
Please let me know if I'm missing something.
Thanks in advance.
suribabuox commented
I just realized it's working as it's supposed to and we'll have to handle that while reading that CSV file.