COPY FROM LOCAL '/foo_bar.csv' in vsql v5.1.0-0 hangs.

Moderator: NorbertKrupa

Post Reply
Shaman
Newbie
Newbie
Posts: 3
Joined: Fri Oct 05, 2012 12:12 pm

COPY FROM LOCAL '/foo_bar.csv' in vsql v5.1.0-0 hangs.

Post by Shaman » Fri Oct 05, 2012 12:21 pm

Hello!

We have vertica 5.1 installed and use vsql v5.1.0-0. It works perfectly while loading big files like this:

Code: Select all

cat /foo_bar.csv | vsql ... -c "COPY .... FROM LOCAL STDIN"
,
but when we issue the similar command

Code: Select all

vsql ... -c "COPY .... FROM LOCAL '/foo_bar.csv'"
,
it hangs when size of file is over than some unknown amount.

Is it possible to fix it without migration to newer Vertica? The best solution for us would be just ability to run vsql several times in one session / transaction.

Thank you.

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: COPY FROM LOCAL '/foo_bar.csv' in vsql v5.1.0-0 hangs.

Post by JimKnicely » Fri Oct 05, 2012 12:39 pm

Hi,

Are you loading the file from a server that is not the database host? If so, are using the vsql client version as the database server?

See: viewtopic.php?f=7&t=328&hilit=local

I've found that prior to Version 6, I had to copy big files to the server and load them from there, i.e.

From client I did something like this:

Code: Select all

gzip -c /mnt/mydata/db_data/vertica_revenue_budget.txt | ssh root@verticaserv01 "gunzip -c - > /data1/tmp/vertica_revenue_budget.txt"
Then on the Vertica server I did this:

Code: Select all

/opt/vertica/bin/vsql -c "truncate table my_wh.revenue_budget;"
/opt/vertica/bin/vsql -c  -c "copy my_wh.revenue_budget from '/data1/tmp/vertica_revenue_budget.txt' direct no escape null as '\N' exceptions '/data1/tmp/vertica_revenue_budget.err';"
That always worked :)

Thanks!
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Shaman
Newbie
Newbie
Posts: 3
Joined: Fri Oct 05, 2012 12:12 pm

Re: COPY FROM LOCAL '/foo_bar.csv' in vsql v5.1.0-0 hangs.

Post by Shaman » Fri Oct 05, 2012 1:23 pm

vsql and vertica are the same version. But I do copy over the network. So, it seems that the only solution for now is to use direct copy on vertica instance...

Post Reply

Return to “Vertica Data Load”