This guide will show you how to securely connect Coalesce Quality to your ClickHouse service.
We need this information so we collect metadata about your tables.To be able to finish this guide, you’ll need the following:
→ Access to create users and grant privileges in ClickHouse (on ClickHouse Cloud, the
→ Access to create users and grant privileges in ClickHouse (on ClickHouse Cloud, the
default user)⏱️ Estimated time to finish: 10 minutes.Data we collect
We read metadata from your ClickHouse service using the dedicated user described below. Every read goes throughsystem.* tables — we never scan your table data to build the catalog. Depending on which features you enable, we ingest:
- Catalog — databases, tables, views, materialized views, columns, data types, positions, and table/column comments.
- SQL definitions — the
CREATE TABLE/CREATE VIEW/CREATE MATERIALIZED VIEWstatement per object. Used for lineage and to detect references between objects. - Keys and indexes — primary keys, sorting keys, partition keys, and data-skipping indexes (
minmax,set, bloom filter, and so on), surfaced as table constraints. - Table metrics — row counts and last-modified timestamps, derived from
system.tablesandsystem.parts, for anomaly detection. - Query logs (opt-in) —
system.query_logfor performance, cost, usage, and lineage signals.
Metadata vs. data access. The grants below give Coalesce Quality access to your schema and DDL, never to row data. Data-reading queries are issued only when you grant
SELECT on your own databases — needed for Custom SQL monitors, data previews, and column profiling — or when you enable SQL test execution against the audit table.Requirements
How metadata is read
ClickHouse system tables are per-node, so on a service with more than one replica a plain read reflects whichever replica answered rather than the whole warehouse. Coalesce Quality therefore reads them throughclusterAllReplicas(<cluster>, …), and the Metadata reads setting on the integration decides which cluster:
- ClickHouse Cloud — nothing to do. Every service exposes a cluster named
default, which is the setting’s default. - Self-managed ClickHouse — list what your server has with
SELECT DISTINCT cluster FROM system.clustersand enter that name in the Cluster field. - A single node with no cluster defined — choose Read the connected node only. System tables are then read directly, which is the correct read when there is nothing to fan out to, and it needs no
REMOTEprivilege. The Cluster field does not apply.
Network access
For the complete list of IP addresses by region, see Coalesce Quality IP Whitelist.
9440, the native TLS port.
On ClickHouse Cloud this is Settings → Security → IP access list for the service. If the list is set to Anywhere no change is needed, but we recommend restricting it to our published addresses.
Setup ClickHouse access
Create a dedicated user
Run the statements in this section as an admin user. On ClickHouse Cloud, open your service’s SQL console from the left menu — it runs asdefault, which has the privileges to create users and grant on system.*. Replace <password> with a secret you define for the integration.
Grant metadata access
Grant query log access (optional)
Required only if you enable Fetch query logs:Grant data access (optional)
Required if you want Coalesce Quality to read rows — Custom SQL monitors, catalog data previews, column profiling, and SQL test execution:Verify
Input data in the Coalesce Quality UI
Go to Settings → Integrations → Add integration → ClickHouse.Where to find these values on ClickHouse Cloud
- Open your service in the ClickHouse Cloud console and click Connect in the left menu.
- In the dialog, switch the protocol drop-down from HTTPS to Native. This matters: the dialog opens on HTTPS and shows port
8443, which this integration cannot use. On Native it shows port9440. - Copy the hostname from the
clickhouse client --host …example. It has the form<service-id>.<region>.<csp>.clickhouse.cloud, for exampleabc123xyz.europe-west4.gcp.clickhouse.cloud. Take the hostname only — not the--hostflag, and not anhttps://prefix.
- The user. It shows credentials for the built-in
defaultuser. Use the dedicatedcoalesce_qualityuser you created above instead, so this integration’s access is scoped and revocable on its own. - The password. ClickHouse Cloud shows a service password once, at creation. This integration uses the password you set in Create a dedicated user, which you control.
Integration name
For exampleClickHouse.
Instance name
A unique name for this instance, for exampleprod or staging. It becomes part of the asset paths for everything this integration ingests, so it cannot be changed after the integration is saved — changing it later means creating a new integration.
Host
The hostname of your service, without a scheme and without a trailing slash — for exampleabc123xyz.europe-west4.gcp.clickhouse.cloud. On ClickHouse Cloud, take it from the Connect dialog as described above.
Port
Pre-filled with9440, the native TLS port. That is the right value for every ClickHouse Cloud service and for any service reachable over the internet — leave it alone unless you are on a private network, where a plaintext native connection uses 9000 (see Network access).
Username and password
coalesce_quality and the password you set above.
Use SSL
On by default, paired with port9440. Turning it off sends your credentials and metadata unencrypted, which is only ever acceptable on a connection that stays inside a private network — see Network access.
Default database
The database to connect to when a table reference omits one — for exampledefault.
Audit table FQN (optional)
Fully qualified name (database.table) of the table where Coalesce Quality should write SQL test audit logs, for example default.quality_sql_test__audit. Coalesce Quality creates the table if it does not exist. Leave empty if you only run metadata monitors and don’t execute custom SQL tests against the warehouse.
Metadata reads
Whether system tables are read across a cluster or on the connected node only. Choosing the cluster read reveals the Cluster field below it. See How metadata is read.Cluster
The cluster to read through, as named underremote_servers in your ClickHouse configuration. Defaults to default, which every ClickHouse Cloud service provides; SELECT DISTINCT cluster FROM system.clusters lists what a self-managed server has. Only shown when Metadata reads is set to read across a cluster.
Additional parameters (optional)
ClickHouse settings applied to every connection this integration opens, as name/value pairs — for examplemax_execution_time 300 to give a large warehouse longer than the 60 seconds Coalesce Quality allows by default.
Values are typed the way ClickHouse types them in a connection string: true and false become 1 and 0, whole numbers become integers, anything else is passed through as text. A name given here replaces the value Coalesce Quality would otherwise use, so this is also how you raise a default that is too low for your warehouse.
Fetch query logs (Recommended)
Pulls fromsystem.query_log. Required for proactive anomaly-monitor training, unused-table detection, usage insights, and cost insights. Needs the system.query_log grant above.
Catalog scope and Metrics scope (optional)
Restrict which databases and tables are ingested into the catalog, and which of those are scanned for metrics. Leave both empty to ingest everything the user can see.system, information_schema, and INFORMATION_SCHEMA are always excluded.
Personal credentials
In addition to the workspace credentials above, you can let each Coalesce Quality member authenticate as themselves against ClickHouse. Queries then run under the member’s own ClickHouse user and respect the grants configured on it. See Data Warehouse Access for the full model and when to enable it.Troubleshooting
Not enough privileges … it's necessary to have the grant SHOW COLUMNS ON system.columns
The user is missing a grant on one of the system tables. The message names the table it stopped on, but there is usually more than one missing — fix them all at once by re-running the full Grant metadata access block, then re-running the same for query logs if that option is enabled.
This most often appears after a ClickHouse server upgrade on a connection that had been working for months, because newer versions enforce explicit grants on system tables that were previously readable implicitly. Nothing changed on your side, and re-granting is the fix.
Requested cluster '…' not found. (CLUSTER_DOESNT_EXIST)
Your ClickHouse has no cluster by that name. List what it does have with SELECT DISTINCT cluster FROM system.clusters and set Metadata reads accordingly; if the result is empty, choose Read the connected node only. See How metadata is read.
Not enough privileges … it's necessary to have the grant REMOTE ON *.*
Reading across a cluster needs GRANT REMOTE ON *.*. Either grant it, per Grant metadata access, or set Metadata reads to Read the connected node only if the server is a single node.
All connection tries failed … Connection refused
Reported when replicas behind the service are unreachable — commonly a service that has scaled down to zero, or is mid-restart. It usually clears on the next scrape. If it persists, check the service is running and that the IP access list allows our addresses.
Connect failed
Check the host has no https:// prefix and no trailing slash, that the port is 9440 with Use SSL enabled, and that the credentials are correct.
If you changed the port, check it is a native-protocol one. 8123 and 8443 are ClickHouse’s HTTP ports and this integration speaks the native protocol, so they cannot connect — use 9440 with TLS, or 9000 without. A port that disagrees with the Use SSL setting fails outright rather than falling back, which surfaces the same way bad credentials do.
In some cases, permission grants can take a while to propagate. If you keep getting a
Connect failed error after double-checking your details, try again after a minute.