Reputation: 499
Is there a way to export the results of a running reporting query, or just to get the contents of a given table, to a CSV file (e.g. that could then be imported by Excel or similar)?
Upvotes: 1
Views: 1453
Reputation: 499
You can export to CSV by running a SELECT
statement from the command line with the --format=csv
flag, e.g.:
cockroach sql --format=csv -e 'SELECT * FROM bank.customers;' > csvtest.csv
Upvotes: 1