We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


How to export Vertica query to a CSV file by using command line (CMD) in header format? — Vertica Forum

How to export Vertica query to a CSV file by using command line (CMD) in header format?

xkidxkid Vertica Customer

Hey folks!

I've problem here, i'm using a batch file where makes me able to export data from a table In Vertica Data base remotely. It works, but somehow the CSV file has a strange format like this:

I mean it has $ sign at the end and single quotes instead headers, here is my command lines code:

@ECHO OFF 
set VSQL_USER=user
set VSQL_PASSWORD=password
set VSQL_HOST=host
set VSQL_DATABASE=databasename
vsql -F $',' -At -o C:\Users\geradiaz.MODELO\Desktop\Icaro\Ventas\Output_Azure\sample_table_output.csv -c " select * from ModeloBI.CORP.ventas limit 10;"

Do you know guys, how to change the format to header command? something like (format csv,header) in postgreSQL

thanks for your time.

Answers

Leave a Comment

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