Reputation: 1
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
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