Skip to main content
New Introducing Mosaic Learn more
Data Warehouse integration

ClickHouse + Conversion

Sync contacts, custom objects, and events from ClickHouse Cloud or self-hosted servers with scheduled SQL.

ClickHouse
Into Conversion
Conversion

How Conversion works with ClickHouse

Conversion connects to ClickHouse Cloud or self-hosted ClickHouse over HTTPS and runs the SQL queries you write on a schedule you choose. Each row lands as a contact, a custom object related to a contact, or an event that can trigger a workflow. Conversion signs in as a dedicated read-only user, so it can run SELECT queries but can't write to your databases.

What you can do

Cloud or self-hosted

Connect a ClickHouse Cloud service on port 8443 or your own server on its HTTPS port. Idle Cloud services take a few seconds to wake, so the first sync after a quiet period can run slower.

Read-only at the user level

Conversion's user is created with readonly = 2, which allows SELECT queries and per-query settings but blocks writes. Grants can cover a whole database or single tables.

Types that survive the trip

Named tuples, Map, and JSON columns arrive as JSON objects and arrays as JSON arrays, while large integers and decimals come through as strings so no precision is lost.

Incremental on your schedule

Run each sync every 15 minutes, hourly, every 6 hours, or daily. Compare your DateTime column with toDateTime() on last_sync_time so a run reads only new and changed rows.

What syncs

Data Direction Details
Contacts Into Conversion Created or updated from each row, identified by userId or email, with columns mapped to field keys by exact name.
Custom objects Into Conversion Any custom object type you define, related to contacts through relationshipFields built as a named tuple.
Events Into Conversion Rows become timestamped events on contacts, and an eventId stops a repeated row from being recorded twice.

How to connect ClickHouse

  1. 1 In the ClickHouse Cloud SQL console or clickhouse-client, create a role with SELECT and SHOW on the database you want to sync.
  2. 2 Create a dedicated user with a strong password and readonly = 2, and grant it the role.
  3. 3 Add Conversion's IP addresses to the service's IP Access List in ClickHouse Cloud, or allow them through your firewall on the HTTPS port if you self-host.
  4. 4 Under Settings > CRM & Syncing > Connections, add a ClickHouse connection with the host, HTTPS port, database, username, and password, then create your syncs.
FAQ

ClickHouse integration FAQ

Yes. Conversion connects to ClickHouse Cloud or self-hosted ClickHouse over HTTPS and runs the SQL queries you write on a schedule you choose. Each row lands as a contact, a custom object related to a contact, or an event that can trigger a workflow. Conversion signs in as a dedicated read-only user, so it can run SELECT queries but can't write to your databases.

Yes. Connect with the host and the HTTPS port configured for the HTTP interface, and allow Conversion's IP addresses through your firewall. A server that exposes only HTTP on port 8123 needs TLS enabled first.

Any recent version handles ordinary syncs. A sync whose first run returns more than a million rows is processed in pages, which needs ClickHouse 23.12 or later, or an explicit ORDER BY in the query on older versions.

SELECT on the databases or tables you sync, and SHOW so the schema browser can list tables and columns. Table metadata comes from system.tables and system.columns, which need no extra grant.

As database.table. ClickHouse has no schema layer between the two, so a three-part name fails. The schema browser inserts the right form when you click a table.

See Conversion with ClickHouse

Book a demo and we'll walk through the ClickHouse integration on a stack that looks like yours.