Need to enter under Vsql:
Import:
Copy emp from '/tmp/emp.csv ' DELIMITER ', ' ESCAPE as ' \ ' enclosed by ' "' DIRECT EXCEPTIONS '/log file path/log filename. log '
Directly on the server command line where the Vertica is located:
vsql-d db Instance-u user name-w password-c "copy corresponding database table from ' file name ' DELIMITER ', '" DIRECT EXCEPTIONS '/log file path/log filename. log ';
Such as:
vsql-d ncell-u dbadmin-w 1-c "copy emp from '/tmp/emp.csv ' DELIMITER ', '" DIRECT EXCEPTIONS '/tmp/emp.log ';
Export:
The current path to the server where the database is located is exported
vsql-d db Instance-u user name-W password-f ', '-at-o exported filename-C ' select * from corresponding database table; "
Such as:
vsql-d ncell-u dbadmin-w 1-f ', '-at-o emp.csv-c ' select * from NCell. EMP; "
In fact other databases (Oracle,mysql ...) Import and export are similar to this
The Vertica of the above command is on the Linux server.
Import and export of database Vertica script mode