dataSci3
dataSci3

Reputation: 1

Exporting a table out of Presto using command line

Is there an easy way to export a table out of Presto using command line? I need it in csv format.

Upvotes: 0

Views: 617

Answers (1)

Mahesh
Mahesh

Reputation: 11

You can use below command to set the output in CSV format. Make sure to set PRESTO_PASSWORD before you run it.

./presto --server {host}:{port_number} --catalog {catalog_name}
--schema {schema_name} --user {user_name} --password --execute "SELECT * FROM table_name" --output-format CSV > output_filename.csv

Upvotes: 1

Related Questions