ClickHouse

ClickHouse is a fast, open-source, column-oriented database management system built for real-time analytics on large volumes of data. It works with both ClickHouse Cloud and self-hosted deployments.

You can use ClickHouse as a destination in Weld to load data from your sources into ClickHouse, use it as the data warehouse behind your Weld Models, and use it as a source for Reverse-ETL syncs.


Setup Guide

  1. Fill in the required fields

    Host: The hostname of your ClickHouse server (for ClickHouse Cloud, this looks like abcd1234.eu-central-1.aws.clickhouse.cloud).
    Port: The port number of your ClickHouse server. Defaults to 8443 for HTTPS and 8123 for HTTP.
    Protocol: https or http. Defaults to https.
    Username: The username to connect with.
    Password: The password for the user.

  1. Permissions

    The user you connect with needs enough privileges, on any database Weld will manage, to:

    • Create and drop databases and tables
    • Insert and select data
    • Run ALTER TABLE ... UPDATE mutations (used to soft-delete removed rows)

Loading data into ClickHouse

Weld creates one ClickHouse database per integration you sync (named after the destination schema you configure for the sync), since ClickHouse doesn't have a nested schema concept within a database the way most other destinations do.

Tables are created as a ReplacingMergeTree ordered by the stream's primary key(s). Incremental syncs load new rows by inserting a newer version of each row, which ClickHouse merges together in the background - so when querying these tables yourself, use the FINAL modifier to see a fully deduplicated result.

Using ClickHouse as a data warehouse

You can also set ClickHouse as the data warehouse behind your Weld Models, so that your SQL transformations run directly against ClickHouse. Weld creates a dedicated database for your models automatically the first time it's needed.

Using ClickHouse with Reverse-ETL

Once connected, ClickHouse can be used as the source for Reverse-ETL syncs - build a SQL model against your ClickHouse data and sync the results out to any of Weld's destinations on a schedule.

Was this page helpful?