Skip to main content

vertica vbr.py

  • August 8, 2016
  • 3 replies
  • 17 views

sreeblr
Forum|alt.badge.img+2

Can vbr.py be used to copy specific tables between vertica servers>?

3 replies

K__
Forum|alt.badge.img
  • Participating Frequently
  • August 8, 2016

When you say vertica servers, do you mean 2 different vertica clusters? 

 

If yes, you can either use the connect export/Copy from vertica option. This requires some setup on the vertica side. 

 

OR

 

just use vsql  to dump data from your source cluster and vsql again to import it on the other cluster

 

Run this on your source cluster. 

 

vsql -c "select * from table"  | vsql -h target_cluster -c "Copy table_name from stdin"

 

Hope you can figure out the rest. 


sreeblr
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • August 8, 2016

there is no direct connectivity between servers hence cannot use vertica copy/export. Also the vertica create file with vsql and importing using copy is quite cumbersome and has some issues with using special charecters/data format data. Thats reason to ponder about using vbr.py


K__
Forum|alt.badge.img
  • Participating Frequently
  • August 8, 2016

I wouldn't play recommend object backup and restore for what you are trying to do. 

You could easily specify delimiters that are very unlikely to be in your data.IMHO that is a better option .