Connect a ClickHouse, SAP HANA / Datasphere, or Oracle datasource
Status: the connectors are wired end-to-end (selectable type, structured form, connection test, listing tables, profiling, validation), but their SQLAlchemy dialect drivers are not bundled in the default worker/API image. Each is an opt-in worker extra —
clickhouse(#399),hana(#400),oracle(#401). Until your image installs the relevant extra, Test connection and the table list return a "driver not available" message. The build step is in Prereqs below.
Goal
You'll add a ClickHouse, SAP HANA (or SAP Datasphere), or Oracle Database instance to Measured Cloud, confirm the connection, and add its tables so you can author rules against them. This is the same UX as the other warehouse connectors — these three differ only in that their drivers ship as opt-in extras.
These three share a code path: unlike the ADBC-backed connectors (Postgres / Snowflake / BigQuery / Redshift / Databricks / Trino), they have no ADBC driver, so Measured Cloud reaches them through a SQLAlchemy engine built from the same registered dialect Great Expectations uses for validation. One driver path, test-through-validate.
Other warehouses on the same connector family: Postgres, Snowflake / BigQuery, Microsoft SQL Server.
Prereqs
-
A running Measured Cloud (see Self-host).
-
The worker image built with the extra for the dialect you want. The extras are declared in
worker/pyproject.toml:- ClickHouse —
clickhouseextra (clickhouse-sqlalchemy, providing bothclickhouse+native://over TCP 9000 andclickhouse+http://over HTTP 8123). Pure-Python, no system packages. - SAP HANA / Datasphere —
hanaextra (sqlalchemy-hanaover SAP's officialhdbcliDB-API driver). SAP ships binaryhdbcliwheels; no system HANA client install needed. - Oracle —
oracleextra (oracledb, the pure-Python successor tocx_Oracle). Runs in thin mode by default, so no Oracle Instant Client install is required.
Install them when building the worker (and, if you run the in-process API connection test, the API) image, e.g.
uv sync --extra clickhouse --extra hana --extra oracle. The published default image omits them so operators who don't run these warehouses don't pay for the drivers. - ClickHouse —
-
A reachable endpoint for the warehouse you're connecting.
-
A least-privilege read-only user with
SELECTon the schema you want to validate.
If your warehouse is on a private network (10.0.0.0/8, 192.168.0.0/16), opt-in by adding the CIDR to DATASOURCE_NETWORK_ALLOWLIST — see Configuration. The SSRF guard rejects private targets by default; these three connectors carry a real routable host in the DSN, so the guard runs for them unmodified (no scheme bypass).
Steps
-
Log in to the UI as a workspace editor or higher.
-
Go to Data Assets → Add source.
-
Pick the type:
ClickHouse,SAP HANA / Datasphere, orOracle Database. -
Fill in the form. Each is a structured per-field form (host, port, database/service, user, password); the password is stored encrypted and never logged.
- ClickHouse — Transport (
native, TCP 9000 /http, 8123), Host, Port (defaults to the transport's port), Database, User, Password. - SAP HANA / Datasphere — Host, Port (defaults to
443for HANA Cloud / Datasphere), Database (thedatabaseNametenant), User, Password. SAP Datasphere exposes a HANA-compatible SQL endpoint, so use this same type. - Oracle — Host, Port (defaults to
1521), Service name, User, Password. The service name is sent asservice_nameto theoracledbthin-mode driver.
- ClickHouse — Transport (
-
Click "Test connection". Measured Cloud opens a SQLAlchemy connection and runs the dialect's version probe — ClickHouse
SELECT version(), HANASELECT VERSION FROM SYS.M_DATABASE, OracleSELECT BANNER FROM v$version— and reports a green check with the round-trip latency or a red X with the error.- Common error: "driver not available" / "Can't load plugin" — the worker/API image doesn't have the dialect extra installed. Rebuild with the extra (see Prereqs).
- Common error: authentication failed — credentials are wrong, or the user lacks
SELECTon the target schema. - Common error: "Datasource address rejected by network allowlist" — the target resolved to a private IP and isn't in
DATASOURCE_NETWORK_ALLOWLIST. Add the CIDR and restart the API.
-
Save the datasource. The window moves on to step 2, Add tables. You can also add tables later from the source's Manage source window (click the source's name on Data Assets).
-
Add tables. Measured Cloud lists the user-owned tables and views, filtering each dialect's system schemas:
- ClickHouse — queries
system.tables, filterssystem/INFORMATION_SCHEMA. - SAP HANA — unions
SYS.TABLESandSYS.VIEWS, filtersSYS/_SYS_*/PUBLIC. - Oracle — unions
ALL_TABLESandALL_VIEWS, filters the data-dictionary + bundled-component owners (SYS/SYSTEM/XDB/CTXSYS/ …) so you see only your own application schemas (Oracle ERP / Oracle Agile PLM, etc.).
Tick the ones you want and click Add N tables.
- ClickHouse — queries
Verify
- The source shows up on Data Assets as a group header with a green connection badge (once the worker image has the extra).
- The tables you added appear as data assets under that source, and read Added in its Manage source window.
- You can now add rules to one of those assets — see Add rules to a data asset.
DSN shapes (for SDK / agent registration)
The UI assembles these client-side from the structured fields; the SDK and agent-registration endpoints emit them directly under config_encrypted.connection_string. For reference:
| Dialect | DSN |
|---|---|
| ClickHouse (native) | clickhouse+native://<user>:<password>@<host>:9000/<database> |
| ClickHouse (http) | clickhouse+http://<user>:<password>@<host>:8123/<database> |
| SAP HANA / Datasphere | hana://<user>:<password>@<host>:443/?databaseName=<DB> |
| Oracle | oracle+oracledb://<user>:<password>@<host>:1521/?service_name=<svc> |
Caveats
- The PARITY-1 test endpoint times out after 5 seconds by default; bump
DATASOURCE_TEST_TIMEOUT_SECONDSif your warehouse takes longer to acknowledge a connection. - The table list is cached for 15 minutes. If you create a new table and don't see it, click Refresh tables in the toolbar (or wait).
- Connection details (host, port, database, credentials) are AES-256-GCM-encrypted at rest. The plaintext exists only inside the worker / API process during a job.
- Profiling and validation route through Great Expectations' generic
add_sqldatasource — GX 1.x has no dedicatedadd_clickhouse/add_hana/add_oraclehelper, but each registered SQLAlchemy dialect drivesadd_sqldirectly. - Row-count estimates come from each dialect's catalogue statistics (ClickHouse
total_rows, HANARECORD_COUNT, OracleNUM_ROWS) and can be stale until the next stats gather — the profiler's explicitCOUNT(*)follow-up populates exact numbers. - Oracle runs in
oracledbthin mode (no Oracle Instant Client). Features that require thick mode (some advanced auth methods) are out of scope for this revision.