Page 1 of 1
How to ignore '\N' in some fields from csv file?
Posted: Sun Nov 23, 2014 4:30 pm
by Benjamin_e
I got bulk of csvs and when I got them the owner of the files said when he export them mysql set the null values to '\N' and when i try to load them to vertica I getting an error.
What is the best way to over it?
Re: How to ignore '\N' in some fields from csv file?
Posted: Sun Nov 23, 2014 4:52 pm
by NorbertKrupa
Tell the owner to stop exporting nulls as \n.
Re: How to ignore '\N' in some fields from csv file?
Posted: Sun Nov 23, 2014 5:15 pm
by Benjamin_e
Any way to pass it? :// I tried everything!
Re: How to ignore '\N' in some fields from csv file?
Posted: Mon Nov 24, 2014 9:43 am
by Benjamin_e
Hey norbertk!
Thank you for you great help! ...
Sharing info is awesome .. consider it next time.
Here is the solution:
copy xxx from '/tmp/data.csv' direct delimiter ',' null as '\N' abort on error;