I'm using COPY INTO
to bulk insert some data into MonetDB. The csv that I'm copying from has some special characters like \
in some string fields and it broke the insertion. The error that I got is:
Failed to import table line 1 field 11 'clob' expected in 'data here'
and when I replace \
with /
it is working fine, I think the problem related to Java because \
is using as escape character but I'm not sure!
this is the command I used for bulk load :
COPY INTO line : copy into dbtest.dbo.table3 from '/home/etltest/out.csv' using delimiters ';','\n','"';
and this is a sample row :
"452475";"0047748";"002";"2014-01-01 00:16:00.000";"2";"2014-01-01 00:16:16.090";"1";"1";"0";"testfile.xml";"~/uploads/Su/F0047748\2014\1";"3d67502e-94ed-4e3d";"2014-01-01 00:15:25.283"
I found a work around which use REPLACE
function in the SQL to replace \
with /
but this is too heavy processing function when handling millions of rows
Why is this happening and is there any way rather than replace the \
?
edit
your question rather than writing in comments. please give a sample line the provokes the error. the textdata here
is nowhere to be found within your sample line..thanks – Anthony Damico