taraslayshchuk / es2csv

Export from an Elasticsearch into a CSV file
Apache License 2.0
510 stars 191 forks source link

Improve CLI fields parsing #44

Open maaaaz opened 6 years ago

maaaaz commented 6 years ago

Hello @taraslayshchuk,

A bug exists in the generated CSV when specifying comma-separated fields on CLI as the first column is the comma-joined list of fields. To be clear, if you specify --fields a,b,c you will have the following CSV:

"a,b,c",a,b,c
empty,whatever,whatever,whatever

But when you specify --fields a b c the CSV will be good:

a,b,c
whatever,whatever,whatever

Could you then improve the parsing ?

Cheers !