Skip to main content

Connect to ClickHouse

Securely connect your Hex workspace to your ClickHouse database.

info
  • Users need the Admin workspace role to create a shared workspace data connection.
  • Users need Can Edit or higher project permissions to create project data connections.

ClickHouse is an open-source column-oriented database management system (DBMS) optimized for online analytical processing (OLAP). It's designed to enable fast, real-time data analysis. ClickHouse achieves its speed and efficiency by employing column-based storage, vectorized query execution, and a range of other data processing optimizations.

You might want to use ClickHouse in scenarios that involve querying and processing large volumes of data. This could include analyzing logs, performing real-time analytical processing, processing time-series data, and running full-text searches, among other uses. It is often used in cases where real-time data analysis is critical.

If you have relatively small data or are very early, using something lightweight like Postgres or uploading csvs or parquet files to our DuckDB integration could also be good options.

How to get set up

  1. Set up a ClickHouse database, either by hosting it on your own infrastructure or signing up for ClickHouse Cloud.
  2. Set up a Clickhouse username and password for usage by Hex.
  3. In Hex, go to SettingsData sources.
  4. Click + Connection, select ClickHouse, and fill out the fields below.
Settings page for data sources

Basic settings

  1. Name and Description - Set a display name and optional description to help identify your data connection.
Clickhouse data connection name and description
  1. Host - The address of your Clickhouse database.
  2. Port - The port used for secure native connections to your ClickHouse database. This is usually 9440 (see Clickhouse documentation).
  3. Username - The Clickhouse username set up for usage by Hex.
  4. Password - The Clickhouse password.
Clickhouse data connection database and authentication credentials

Additional settings

The data connection form includes several optional sections:

tip

If you use a firewall to restrict database access, you'll need to add Hex's IP addresses to your allowlist.