Closed enteve closed 3 years ago
Hi @enteve ,
Double quote ("
) is the CSV default quote and double double-quote (""
) is the default escaped quote.
So "[""apple"",""orange""]"
is the correct output.
This seems like an issue with Clickhouse and not something related to arrays.
You'd get the same problem is you'd have strings container a double quote ("This is a quote: \""
) or objects ({ a: 1, b: 2 }
).
If you want double quote ("
) as the CSV quote and single quote ('
) as the escaped quote, simply set the escapedQuote
option (escapedQuote: '\''
).
Closing since there is no response and my previous comment explains the right approach. Feel free to reopen if you think that's needed.
Currently, if you got an string array, the csv output is like this:
"[""apple"",""orange""]"
which will raise error when trying to import to databases (in my case: clickhouse). The output should be
"['apple','orange']"
Reminder:
I only tested importing csv to Clickhouse. I didn't test other databases.