Some core functionality may be limited. If you're interested in contributing, check out the source code for each repository listed below.
Overview of dbt-clickhouse
- Maintained by: Community
- Authors: Geoff Genz
- GitHub repo: ClickHouse/dbt-clickhouse
- PyPI package:
- Slack channel: #db-clickhouse
- Supported dbt Core version: v0.19.0 and newer
- dbt Cloud support: Not Supported
- Minimum data platform version: ?
pip is the easiest way to install the adapter:
pip install dbt-clickhouse
dbt-clickhouse will also install
dbt-core and any other dependencies.
For Clickhouse-specifc configuration please refer to Clickhouse Configuration
For further info, refer to the GitHub repository: ClickHouse/dbt-clickhouse
Connecting to ClickHouse with dbt-clickhouse
To connect to ClickHouse from dbt, you'll need to add a profile to your
profiles.yml file. A ClickHouse profile conforms to the following syntax:
Description of ClickHouse Profile Fields
|This must be included either in |
|Required. A ClickHouse's database name. The dbt model database.schema.table is not compatible with ClickHouse because ClickHouse does not support a schema. So we use a simple model schema.table, where schema is the ClickHouse's database. We don't recommend using the |
|Required. A ClickHouse username with adequate permissions to access the specified |
|Required. The password associated with the specified |
|Optional. The ClickHouse client interface, |
|Optional. ClickHouse server port number. Defaults to 8123/8443 (secure) if the driver is |
|Optional. The host name of the connection. Default is |
|Optional. Number of times to retry the initial connection attempt if the error appears to be recoverable.|
|Optional. For (|
|Optional. Whether the connection (either http or native) is secured by TLS. This converts an http driver connection to https, and a native driver connection to the native ClickHouse protocol over TLS. the Defaults to False.|
|Optional. Add connection settings to improve compatibility with clusters using the Replicated Database Engine. Default False.|
|Optional. Connection timeout in seconds. Defaults is 10 seconds.|
|Optional. Timeout for receiving data from or sending data to ClickHouse. Defaults to 5 minutes (300 seconds)|
|Optional. Timeout for connection ping request (native connection only). Defaults to 5 seconds.|
|Optional. Use compression in the connection. Defaults to |
|Optional. Compression block size (in bytes) when using compression with the native driver. Defaults to 1MB|
|Optional. Database engine to use when creating new ClickHouse schemas (databases). If not set (the default), new databases will use the default ClickHouse database engine (usually Atomic).|
|Optional. On connecting to the ClickHouse, if this is parameter is |
|Optional. If ClickHouse experimental lightweight deletes are available, use the |
|Optional. A mapping of ClickHouse specific user settings to use with the connection. See the ClickHouse documentation for supported settings.|
If you encounter issues connecting to ClickHouse from dbt, make sure the following criteria are met:
- The engine must be one of the supported engines.
- You must have adequate permissions to access the database.
- If you're not using the default table engine for the database, you must specify a table engine in your model configuration.