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?
How to ignore '\N' in some fields from csv file?
Moderator: NorbertKrupa
-
- Newbie
- Posts: 15
- Joined: Tue Aug 26, 2014 1:43 pm
-
- GURU
- Posts: 527
- Joined: Tue Oct 22, 2013 9:36 pm
- Location: Chicago, IL
- Contact:
Re: How to ignore '\N' in some fields from csv file?
Tell the owner to stop exporting nulls as \n.
Checkout vertica.tips for more Vertica resources.
-
- Newbie
- Posts: 15
- Joined: Tue Aug 26, 2014 1:43 pm
Re: How to ignore '\N' in some fields from csv file?
Any way to pass it? :// I tried everything!
-
- Newbie
- Posts: 15
- Joined: Tue Aug 26, 2014 1:43 pm
Re: How to ignore '\N' in some fields from csv file?
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;
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;