Skip to main content

Cluster Query

Once the cluster is created, you may query the cluster to check that it’s up and running.

Query your ClickHouse Instance

If you want to query a cluster, not only should its slug be passed as a parameter but the ClickHouse query as well, which has to be a string in the ClickHouse format. In this example the query 'SELECT now()' will be used.

curl -X 'GET' \
'https://api.gigapipe.com/v1/clusters/<your_cluster_slug>/query?query=SELECT now()' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <your_access_token>'
# Payload response ::Dictionary
{
"meta": [
{
"name": "now()",
"type": "DateTime"
}
],
"data": [
{
"now()": "2022-02-14 13:20:38"
}
],
"rows": 1,
"statistics": {
"elapsed": 0.000865866,
"rows_read": 1,
"bytes_read": 1
}
}

Query parameters

Attributes


slug  ::String

The cluster slug you want to query


query  ::String

The query you want to make against ClickHouse


Query response

Attributes


rows  ::Integer

The number of returned rows


meta  ::Dictionary

name  ::String

The query name

type  ::String

The query type


data  ::Dictionary

The query result


statistics  ::Dictionary

elapsed  ::Float

The elapsed time

rows_read  ::Integer

How many rows have been read

bytes_read  ::Integer

How many bytes have been read