I am trying to dump a CSV file for analytical purposes from Clickhouse. Currently, the dump occurs on the Clickhouse VM and I am unable to access it. Is it possible to use SCP to dump the data to my local machine instead of the server?
Asked
Active
Viewed 140 times
0
-
try this one: https://stackoverflow.com/a/22138783/303298 – vladimir Feb 05 '20 at 05:50
1 Answers
1
CH HTTP API allows to get a query result in CSV format
https://clickhouse.yandex/docs/en/interfaces/http/
echo "select number, 'x' x from numbers(10) format CSV" | \
curl 'http://user:password@ch-host:8123/?query=' --data-binary @-

Denny Crane
- 11,574
- 2
- 19
- 30