ClickHouse
Connect ClickHouse to Algenta as a governed connector. Configure host, port, database, user, password, and secure, then test, browse, connect, and query.
This task walks you through wiring a ClickHouse cluster into Algenta as a clickhouse connector. You create the connector with its real config fields, run a live connection test, browse the tables it exposes, and run a governed query against it.
ClickHouse is a SQL connector under the hood — Algenta speaks to it over the native HTTP interface using the clickhouse-connect client. Everything you store stays a governed data source: the engine queries it under a typed, validated contract.
Before you start
A reachable ClickHouse endpoint (host, HTTP port, and credentials). The default HTTP port is
8123for plaintext and8443when TLS is enabled.An Algenta API key. See Authentication for how to obtain and send it.
The self-hosted engine running on
http://localhost:8000, or the hosted API athttps://api.algenta.ai.
Config fields
The clickhouse connector accepts these fields in config. They map directly to the ClickHouse client the engine builds.
host
Yes
localhost
ClickHouse hostname or IP.
port
No
8123 (or 8443 when secure)
HTTP interface port.
database
No
default
Target database.
user
No
default
Username. username is accepted as an alias.
password
No
empty
Password for the user.
secure
No
false
Use TLS (HTTPS). Accepts true/1/yes/on.
1. Create the connector
Send the config to POST /v1/connectors. New connectors start in the untested status until you run a test.
The response is the connector record. Keep id — every step below uses it.
2. Test the connection
Run POST /v1/connectors/{connector_id}/test. The engine opens a real ClickHouse client and runs SELECT 1. On success the connector flips to live; on failure it goes to error and records the reason.
Expected result. The connector flips to live, and a successful test reports the resolved host, port, and database:
3. Browse the schema
Once the connector is live, list its tables with GET /v1/connectors/{connector_id}/browse. Browsing a connector that has not been tested returns a 409 not_connected — run the test first.
Use the items to pick the table (or build the SQL) you will query.
4. Query the connector
A clickhouse connector backs a governed data source. Point a source selection at a table, or supply a SELECT query. The SQL connector reads query and an optional limit; the engine wraps your query and applies the limit so results stay bounded.
For the full governed-query flow — typed contracts, field hints, and operators — see Run a governed query. For the connector and query endpoint shapes, see the API reference.
Troubleshooting
invalid_config mentioning clickhouse-connect
The client library is not installed on the engine host.
Test fails with a connection error
Wrong host/port, or secure mismatched with the port (use 8443 for TLS, 8123 for plaintext).
409 not_connected on browse
The connector is not live yet — run the test first.
Blocked by privacy policy
The ClickHouse host is not in the egress allowlist for the engine.
Next steps
Run a governed query — the full typed-contract query flow against your new source.
Connectors overview — the lifecycle across every connector type.
Connectors reference — every type, config field, and endpoint.
Troubleshooting — diagnose a failed test or blocked egress.
Last updated
Was this helpful?