Skip to main content



The ClickHouse source supports both Full Refresh and Incremental syncs. You can choose if this connector will copy only the new or updated data, or all rows in the tables and columns you set up for replication, every time a sync is run.

This Clickhouse source connector is built on top of the source-jdbc code base and is configured to rely on JDBC v0.3.1 standard drivers provided by ClickHouse here as described in ClickHouse documentation here.

Resulting schema

The ClickHouse source does not alter the schema present in your warehouse. Depending on the destination connected to this source, however, the schema may be altered. See the destination's documentation for more details.


Full Refresh SyncYes
Incremental SyncYes
Replicate Incremental DeletesComing soon
Logical Replication (WAL)Coming soon
SSL SupportYes
SSH Tunnel ConnectionYes
NamespacesYesEnabled by default

Getting started


  1. ClickHouse Server or later.
  2. Create a dedicated read-only Airbyte user with access to all tables needed for replication

Setup guide

1. Make sure your database is accessible from the machine running Airbyte

This is dependent on your networking setup. The easiest way to verify if Airbyte is able to connect to your ClickHouse instance is via the check connection tool in the UI.

This step is optional but highly recommended to allow for better permission control and auditing. Alternatively, you can use Airbyte with an existing user in your database.

To create a dedicated database user, run the following commands against your database:

CREATE USER 'airbyte'@'%' IDENTIFIED BY 'your_password_here';

Then give it access to the relevant schema:

GRANT SELECT ON <database name>.* TO 'airbyte'@'%';

You can limit this grant down to specific tables instead of the whole database. Note that to replicate data from multiple ClickHouse databases, you can re-run the command above to grant access to all the relevant schemas, but you'll need to set up multiple sources connecting to the same db on multiple schemas.

Your database user should now be ready for use with Airbyte.

Connection via SSH Tunnel

Airbyte has the ability to connect to a Clickhouse instance via an SSH Tunnel. The reason you might want to do this because it is not possible (or against security policy) to connect to the database directly (e.g. it does not have a public IP address).

When using an SSH tunnel, you are configuring Airbyte to connect to an intermediate server (a.k.a. a bastion sever) that does have direct access to the database. Airbyte connects to the bastion and then asks the bastion to connect directly to the server.

Using this feature requires additional configuration, when creating the source. We will talk through what each piece of configuration means.

  1. Configure all fields for the source as you normally would, except SSH Tunnel Method.
  2. SSH Tunnel Method defaults to No Tunnel (meaning a direct connection). If you want to use an SSH Tunnel choose SSH Key Authentication or Password Authentication.
    1. Choose Key Authentication if you will be using an RSA private key as your secret for establishing the SSH Tunnel (see below for more information on generating this key).
    2. Choose Password Authentication if you will be using a password as your secret for establishing the SSH Tunnel.
  3. SSH Tunnel Jump Server Host refers to the intermediate (bastion) server that Airbyte will connect to. This should be a hostname or an IP Address.
  4. SSH Connection Port is the port on the bastion server with which to make the SSH connection. The default port for SSH connections is 22, so unless you have explicitly changed something, go with the default.
  5. SSH Login Username is the username that Airbyte should use when connection to the bastion server. This is NOT the Clickhouse username.
  6. If you are using Password Authentication, then SSH Login Username should be set to the password of the User from the previous step. If you are using SSH Key Authentication leave this blank. Again, this is not the Clickhouse password, but the password for the OS-user that Airbyte is using to perform commands on the bastion.
  7. If you are using SSH Key Authentication, then SSH Private Key should be set to the RSA Private Key that you are using to create the SSH connection. This should be the full contents of the key file starting with -----BEGIN RSA PRIVATE KEY----- and ending with -----END RSA PRIVATE KEY-----.


VersionDatePull RequestSubject
0.1.102022-04-1211729Bump mina-sshd from 2.7.0 to 2.8.0
0.1.92022-02-09#10214Fix exception in case password field is not provided
0.1.82022-02-1410256Add -XX:+ExitOnOutOfMemoryError JVM option
0.1.72021-12-24#8958Add support for JdbcType.ARRAY
0.1.62021-12-15#8429Update titles and descriptions
0.1.52021-12-01#8371Fixed incorrect handling "\n" in ssh key
0.1.420.10.2021#7327Added support for connection via SSH tunnel(aka Bastion server).
0.1.320.10.2021#7127Added SSL connections support. json config validator.

CHANGELOG source-clickhouse-strict-encrypt

VersionDatePull RequestSubject
0.1.62022-02-09#10214Fix exception in case password field is not provided
0.1.52022-02-1410256Add -XX:+ExitOnOutOfMemoryError JVM option
0.1.32021-12-29#9182 #8958Add support for JdbcType.ARRAY. Fixed tests
0.1.22021-12-01#8371Fixed incorrect handling "\n" in ssh key support for connection via SSH tunnel(aka Bastion server). source-clickhouse-strict-encrypt that supports SSL connections only.