Reading csv files?

Moderator: NorbertKrupa

Post Reply
Posts: 1
Joined: Wed Apr 03, 2013 5:03 pm

Reading csv files?

Post by kiboro » Wed Apr 03, 2013 5:17 pm

I'm having a lot of trouble with trying to import csv files using copy from.

Vertica doesn't seem to handle csv at all well. I can use comma as a delimiter but
that's about it. Cmmas in quoted fields are erroneously picked up as column breaks,
carriage returns in quoted fields are not handled and, minor but annoying, I can't
skip the header row.

Is there any way to sensibly import a csv file?

I guess I can use a weird delimiter but I've never been able to find one which doesn't
appear in any of our very disparate data sets. The real killer is cr and lf in quoted
fields. Those are significant in some data sets.

User avatar
Posts: 118
Joined: Sat Apr 28, 2012 11:37 am

Re: Reading csv files?

Post by becky » Wed Apr 03, 2013 7:43 pm

What do you mean by:
I can use comma as a delimiter but that's about it.
I think we can use any delimiter we want using the DELIMITER option of the COPY command 8-)

And maybe this link'll help you out with carriage returns in quoted strings?


Post Reply

Return to “Vertica Migration”