COPY vs. LCOPY

Moderator: NorbertKrupa

Post Reply
User avatar
Josh
Intermediate
Intermediate
Posts: 106
Joined: Thu Jan 26, 2012 9:38 pm

COPY vs. LCOPY

Post by Josh » Tue Mar 27, 2012 7:38 pm

What is the difference between the COPY and LCOPY commands? Is there a reason why I would use one over the other?
Thank you!
Joshua

Craig_DEI
Newbie
Newbie
Posts: 1
Joined: Tue Jun 16, 2015 7:25 pm

Re: COPY vs. LCOPY

Post by Craig_DEI » Tue Jun 16, 2015 7:53 pm

Hi,

COPY Bulk loads data from one or more files or pipes on a cluster host into a Vertica database. Meaning the files must already be on one of the host servers in the cluster.

LCOPY Loads a data file from a client system into the database. Meaning the file is located locally on the machine of the user. It can only be used via the ODBC interface and is used to actually take the file from your machine to the cluster.

Thus, the use of the commands depends on where the file(s) is located and/or your willingness/access to put the file directly on one of the Vertica cluster servers.

Thanks,
Craig

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: COPY vs. LCOPY

Post by NorbertKrupa » Wed Jun 17, 2015 4:17 am

From the documentation:
The LCOPY function has been removed from the version 5.1 driver. You should instead use the LOCAL option of the COPY SQL statement to copy data from the client system to the server. See Streaming Data From the Client Using COPY LOCAL.
Checkout vertica.tips for more Vertica resources.

Post Reply

Return to “Vertica Data Load”