Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

COPY FROM "STDIN REJECTED DATA AS TABLE

I am unable to execute the "COPY tablename. FROM "STDIN REJECTED DATA AS TABLE tablename_rejects from Java 1.8 to a remote vertica server(docker running Vertica Analytic Database v9.0.0-0). Is there any workaround?

Tagged:

Answers

  • What error are you getting? Looks like there are typos in your statement. Look at the quotes and the misplaced period after tablename.

    A good debugging tip is to try the sql in vsql:
    [[email protected]:vtest /tmp 20ms]$ vsql -c "create table s (i int);"
    CREATE TABLE
    [[email protected]:vtest /tmp 40ms]$ vsql -c "copy s. from STDIN rejected data as table s_rej;"
    ERROR 2754: COPY requires a data source; either a FROM clause or a WITH SOURCE for a user-defined source
    [[email protected]:vtest /tmp (1) 6ms]$ vsql -c "copy s from STDIN rejected data as table s_rej;"
    Enter data to be copied followed by a newline.
    End with a backslash and a period on a line by itself.
    >> 1
    >> 2
    >> .
    [[email protected]:vtest /tmp 6.3s]$

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.