COPY WITH SOURCE + LOCAL

ShaunSShaunS
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

  • Ariel_CaryAriel_Cary Vertica Employee Employee

    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?

  • Ariel_CaryAriel_Cary Vertica Employee Employee

    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