Dump varbinary data using VSQL

Create table test(hash1 varbinary(64000), hash2 varbinary(64000))
Select * from test
hash1 hash2
xxx. yyy
yyy bbb

I exported this table using VSQL like this
~/opt/vertica/bin/vsql -c 'Select * from test' -U ‘user_name’ -w ‘password’ -h hostname -p 5433 -F $',' -At -o '/tmp/output.csv'

The problem is output.csv gets stored in text format, when I try to load the data back from this file using copy command like

copy test2
FROM LOCAL '/tmp/output.csv'
WITH DELIMITER AS ‘,’

Comments

  • Jim_KnicelyJim_Knicely Administrator, Moderator, Employee, Registered User, VerticaExpert
    edited November 2018

    What's the issue? Do you get an error when you run the COPY command? Note that you have incorrect characters enclosing your delimiter.

    Should be:

    WITH DELIMITER AS ','

    You have this:

    WITH DELIMITER AS ‘,’

Leave a Comment

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