prestoclient
prestoclient copied to clipboard
CPrestoClient uses escaped quotes when writing results
I have data which contains a string, similar to
The song "Candle in the Wind"
Normally if this wrote to a csv I would expect The song ""Candle in the Wind""
When I use the CPrestoClient it writes it as The song "Candle in the Wind"
How can I use "" instead of "? I think the answer is inside prestoclientjsonstream.c, where backslashes and quotes are detected, but I cannot find the exact solution
Hi, looking through the sourcecode of prestoclientjsonstream.c. I think the escaping comes directly from Presto. Haven't got a working Hadoop/Presto setup at the moment, so I can't check it.
What you could do is add some code to the write_callback_function to change the escaping. Not an ideal solution, but probably more than fast enough.