juan garcia
juan garcia

Reputation: 1526

Is it possible to download CrateDB results in CSV file?

I need to query the database, and drop the results in a csv file.

I remember I did this with sql server, is it possible to do this CrateDB?

Upvotes: 1

Views: 1319

Answers (2)

Sebastian Utz
Sebastian Utz

Reputation: 729

CrateDB's crash shell supports various different output formats, including csv.

Example:

crash --format csv -c 'select * from sys.cluster' > sys_cluster.csv

See https://crate.io/docs/reference/crash for details.

Upvotes: 5

vishwarajanand
vishwarajanand

Reputation: 1071

Of course yes, where are u getting stuck?

You can find the official github repository of examples: crate/crate-sample-apps, where cratedb is used. You can use this as a baseline to understand crate.

And, you can easily convert the values from crate to a CSV format using various language specific libraries. For example, in python you can use csv.

Upvotes: 1

Related Questions