0

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?

1 Answers1

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