cancel
Showing results for 
Search instead for 
Did you mean: 

Handling Oracle non-standard CSV exports

cesar_bolanos
New Contributor

We have worked on several projects where Oracle DBAs create direct table extracts using standard Oracle tools. Those tools do not generated properly escaped CSV files. As such, lines like

“123”,"quote",“test”
“345”,“Mc"Donalds”,“test2”

Cause Snaplogic’s CSV parser to reject those lines

Does anyone have any recommendations on how to deal with this type of file?

Thanks

PS We even have a case in which a database column has JSON text, which compounds the non-escaped values even further

5 REPLIES 5

Ravi
New Contributor

Hi Cesar,
we are facing similar issue inclusing additional non english characters parsing. Do you have any solution found for this. TIA.

alchemiz
Contributor III

Hi, I did encounter this unlikely double quotes before so what I did was do a cleanup of those characters using a mapper with binary input… first replace all " with " to escape that character then replace the double-quotes with the regular one 😆

image

Ravi
New Contributor

Hi,
Thanks for reply, will this resolve issue with only double quotes or also non english characters are mapped in transformation. (if possible can you include the formula used in transformation.)
can you please tell the reason for including document to binary before csv parser.
Thank you in advance.

alchemiz
Contributor III

CSV parser input needs to be a binary

.replace(/"/g,‘\"’). ← replace all " to "
.replace(/“/g,‘"’) ← replace all “ to "
.replace(/”/g,‘"’) ← replace all ” to "