The Vertica Forum is getting a makeover! The site will be undergoing maintenance from Tuesday 8/13 to Friday 8/16. We appreciate your patience and cooperation during this time.

COPY WITH SOURCE + LOCAL

edited August 2018 in General Discussion

I run a command like this with no issues:
COPY
{table}
WITH SOURCE STV_ShpSource(file='{server path to file}')
PARSER STV_ShpParser();

Is there a way to run a similar command pulling the file from my local PC? I'm aware that COPY LOCAL works, but it does not seem to work in this 'file' parameter. Here's what I'm trying:
COPY
{table}
LOCAL
WITH SOURCE STV_ShpSource(file='{local PC path to file}')
PARSER STV_ShpParser();

Thanks in advance!

Comments

  • The shapefile needs to be accessible from the database node where you are running the COPY command. So, you'd first need to copy your local file to a file system accessible by the Vertica node.

  • Thanks, that's what I figured. Is there a SQL command to upload a file to the node, or would that strictly be a DBA function through admin console?

  • Your OS admin generally would give you a user with privileges to upload files into a directory accessible by the Vertica node.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.