Datasource setup

Connect ClickHouse

Create a read-only ClickHouse account, configure its HTTPS connection and verify a query as the intended user.

You need permission to manage datasources in Querio and a ClickHouse administrator who can create the user, grant access and confirm the network route. The examples below use analytics.orders; substitute your own database, table and columns.

1. Prepare a read-only ClickHouse user

Have your ClickHouse administrator create a dedicated user with a securely supplied password, grant SELECT on the approved table, and review the grants:

CREATE USER querio_reader IDENTIFIED BY 'REPLACE_WITH_SECRET';
GRANT SELECT ON analytics.orders TO querio_reader;
SHOW GRANTS FOR querio_reader;

Use the database username and password in Querio, not a ClickHouse Cloud console login or Cloud API key. If the user needs more tables, grant only those tables. For an approved whole database, the administrator can instead use GRANT SELECT ON analytics.* TO querio_reader;. See ClickHouse's CREATE USER and GRANT references for authentication, host restrictions and grants.

Querio also reads ClickHouse catalog metadata. Check the actual tables and columns after connecting; a connection test alone does not establish access to every intended object.

2. Get the HTTP(S) endpoint

For ClickHouse Cloud, open your service's Connect page and choose HTTPS. Copy the hostname from its connection details. For a self-managed server, ask its administrator for a configured HTTPS listener and certificate.

Querio connects through ClickHouse's HTTP interface, using HTTPS port 8443 when Secure is enabled. Native TCP endpoints on 9000 or 9440 will not work. ClickHouse lists the network ports for each interface.

If access is restricted, use Copy IP Address in Querio's connection form and have your deployment contact confirm the source address. Allow that source to reach the HTTPS endpoint on 8443. For ClickHouse Cloud, review the service's IP access list. For a private or self-managed endpoint, confirm the route and listener with your administrator. Reachability from your laptop does not establish reachability from Querio.

3. Enter the connection in Querio

  1. Open Settings > Datasources > Add datasource, then choose Internal.
  2. Enter a unique Slug, such as clickhouse-analytics, and an optional Name. Set Database type to ClickHouse.
  3. Enter these connection fields:
FieldValue
HostHostname only, such as SERVICE.REGION.clickhouse.cloud. Omit https://, the port, paths and query parameters.
Userquerio_reader, or your dedicated ClickHouse username.
PasswordThat user's password. Enter it literally in this field; do not URI-encode it.
SecureLeave enabled for HTTPS. Enabled by default.
VerifyLeave enabled to verify the server certificate and hostname. Enabled by default.

Enter the password in the connection form, never in an analysis prompt or screenshot. The form has no port field: HTTPS uses 8443; turning Secure off selects unencrypted HTTP on 8123. If your endpoint requires another port, including 443, ask Querio to confirm compatibility before setup. The form also has no custom CA, client certificate or TLS server-name field. Resolve private trust or mutual TLS requirements with Querio; keep Secure and Verify enabled.

There is no Database or Schema field. ClickHouse databases appear as schemas in Querio's catalog. Use fully qualified table names, such as analytics.orders, in queries. The shared SSH connection does not support ClickHouse.

4. Test the connection and query a table

  1. Select Test connection. If it succeeds, select Create. Querio tests the connection again before saving it.
  2. Follow Connect a datasource to add the intended tables to Context. Check that the expected tables and columns appear.
  3. Review access for the intended user. They need datasource permission and exactly one authorized credential. The first credential is initially assigned to Everyone; see credential selection.
  4. As that user, open an Explore with the datasource selected. Run a small read from an approved table and inspect the SQL and result:
SELECT order_id, status
FROM analytics.orders
WHERE order_id = 1001
LIMIT 1;

Replace the sample identifiers and order ID with a record you can check independently. Compare the returned values with a trusted query under the same database account and data snapshot. An empty result may be correct, so check the chosen ID before treating it as an access failure. If the catalog is missing tables or columns, resolve that before relying on the connection.

Next, add context for the tables your team will use, then analyze your data.

If a check fails

SymptomWhat to check
Timeout, refused connection or DNS failureHostname, HTTPS listener on 8443, Cloud IP access list, firewall and route from Querio.
Protocol error or unexpected HTTP responseConfirm this is the HTTPS endpoint, not a native TCP endpoint or a proxy that requires another port or path.
Authentication failureCheck the database username, literal password and any user-host restrictions. A Cloud API key is not the password for this form.
Certificate verification failureCheck that the hostname matches the certificate and that its chain is trusted. Ask Querio about trust configuration if you use a private CA; do not disable Verify as a routine fix.
Missing database, table or columns; query deniedCheck the qualified name, identifier case, table grants and catalog refresh. Do not add administrative grants to mask a metadata error.
Test succeeds, but a teammate cannot queryCheck that person's datasource permission, credential assignment and upstream table access.

For shared credential and access troubleshooting, see Datasources and credentials and Groups. If the failure remains unexplained, use Troubleshoot and get help with secrets redacted.

Was this page helpful?

Last updated on December 3, 2026

On this page