Loading...

ClickHouse

Run read-only SQL queries against your ClickHouse database and bring the results into the sheet.

The ClickHouse connector runs a SQL query of your choice, read-only, against a ClickHouse database you manage: no OAuth required, it uses the host, port, database name, username and password you enter when connecting. Unlike MySQL/MariaDB/PostgreSQL, it talks to ClickHouse's native HTTP interface directly, not through a JDBC driver.

Only SELECT queries are allowed (optionally preceded by WITH): no INSERT, UPDATE, DELETE or statements that change the schema, checked before every run.

Tip for daily updates: to automatically pull only new data every day (e.g. with a schedule and "Append new results to old" enabled), no special mechanism is needed: write a condition directly in the query using ClickHouse's own date functions, evaluated by the database on every run, e.g. WHERE toDate(data_inserimento) = today() or WHERE data_inserimento >= today() - 1. The saved query text never changes, but the result changes every day because these functions are evaluated by the database at execution time, not when you write the query once.

Available metrics

There are no fixed metrics or dimensions: the report columns are exactly the columns your SQL query returns (the column names or aliases used in the SELECT).

Known limits

  • SELECT-only queries (or WITH)
    One statement per query, no INSERT/UPDATE/DELETE or schema changes: checked before every run. A query that fails this check shows an error instead of running.
  • No test when you connect
    The connection page saves what you enter without testing it: the real test happens the first time you select that connection to configure a report, not when you create it.
  • The server must be reachable from the internet
    Does not work with local networks or behind a VPN. Uses ClickHouse's HTTP interface (not JDBC): the server firewall must allow the IP ranges Google publishes at gstatic.com/ipranges/goog.json, and the port must be 1025 or higher (standard 8123 is fine, 8443 for HTTPS).
  • HTTP by default, with an HTTPS option
    By default the connection uses plain HTTP (port 8123). If your ClickHouse server requires an encrypted connection — common on managed services, usually on port 8443 — check "Use HTTPS" when connecting. Always use a dedicated user with read-only permissions, regardless of this setting.