Some tips on using command-line tool
vsql for connecting and interacting with Vertica database.
You can connect to Vertica database with username and password. When doing this, note that the password might be seen in the command history.
Or you can connect to Vertica with Kerberos authentication.
Note that from time to time, you could run into Kerberos GSI failure because the ticket expired. This is how you can renew and extend the ticket: run the following command to refresh Kerberos cache for the headless account
You can also run a single SQL command from command line with
-c option or, alternatively, a SQL script file with multiple commands with
These options can be very useful to automate in shell/python scripts.
Note that you can also parameterize your scripts by using
-v option to assign variables inside your SQL scripts.
Vsql meta commands
Here is list of commonly used vsql meta commands:
1 2 3 4
Here are the vsql commands to export a file:
1 2 3 4 5