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.

How to copy data via csv file between clusters

I have some tables in Cluster 1 - I want the data from these tables copying to another cluster for a refresh and sone testing - Its not possible to do this using export so I am trying to use copy .. On the source cluster I am dumping the data to a file as follows (Which seems to give me a CSV / txt file) vsql -U user_name -w user_password -F ',' -At -o exp_USER_PASSWORD_HISTORY.txt -c "select * from USER_PASSWORD_HISTORY;" I copy the text fiile to the other cluster. The user on the other cluster is the same / the table already exists (same structure) and has been truncated. Now I am struggling to get the copy into the destination cluster to work, Please advise?

Comments

  • this works cat /home/dbadmin/xtest/exp_dumps/exp_ACCOUNT_LOGON.txt | vsql -c "COPY schema_owner.ACCOUNT_LOGON FROM STDIN DELIMITER ',' DIRECT";

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.