Page 1 of 1

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

Posted: Fri Oct 05, 2012 12:21 pm
by Shaman
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.

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

Posted: Fri Oct 05, 2012 12:39 pm
by JimKnicely
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!

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

Posted: Fri Oct 05, 2012 1:23 pm
by Shaman
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...