Loading the documentation…

Connect ClickHouse

The Clickhouse source reads tables from a ClickHouse server into the Lake. It connects over the server's HTTP interface, or HTTPS with SSL/TLS on. Use this page to fill in each field of the Clickhouse form. The steps shared by every SQL engine are on Connect a SQL database.


Prerequisites


Add the source

  1. Open Lake and click Add datasource, or open the New menu in the toolbar above the tree.
  2. Choose Clickhouse in the picker.
  3. Fill in the General, Connection and Datetime steps as described below.
  4. Click Add.

Connection settings

General step

Name (Mandatory)

Code (Mandatory)

Folder (Optional)

Connection step: Address

Paste connection string (Optional)

Host (Mandatory)

Port (Mandatory)

The form has no database field: the source reads every database the user can see.

Connection step: Authentication

Username (Mandatory)

Password (Mandatory)

Connection step: Security

SSL/TLS (Optional)

Datetime step

Timezone (Optional)

Datetime values (Optional)

Timezones and datetime values explains both settings in full.


Test and save

  1. On the Connection step, click Test connection. The button reads Testing… while it runs.
  2. Connection test passed means DataMind reached the server and signed in. A passing test can also show Detected source timezone: with the server's timezone. Connection test failed shows the server's message with a copy button.
  3. On Datetime, check the summary: Name, Server, Username and Security.
  4. Click Add. Then import its tables.

The test is optional and never saves the source. To edit or duplicate the source later, see Connect a SQL database.


Questions, answered

Which port do I enter: 8123, 8443 or 9000?

The port of the HTTP interface: 8123 by default, or 8443 for HTTPS. The source does not use the native protocol port, such as 9000, so a test on that port fails.

Why is there no Database field?

The source reads every database the user can see, except the system databases system, information_schema, INFORMATION_SCHEMA and _temporary_and_external_tables. You choose the tables you want when you import. To limit what the source sees, limit the user's grants on the server.

Why do my tables sit under a schema named default?

ClickHouse has no schemas inside a database. The Lake shows each ClickHouse database with a single schema called default, and its tables beneath it.

Do my column types change on load?

Types arrive as the source reports them; a FixedString column arrives as String. See Data types.

Can I send data back to ClickHouse?

Yes. Clickhouse is also offered as a Writeback destination, with the same connection fields. See Add and manage destinations.