From d298f2491cd2c60be08bb4edf109aa8fbfcf7d13 Mon Sep 17 00:00:00 2001 From: dlouseiro Date: Fri, 12 Jun 2026 14:33:44 +0100 Subject: [PATCH] Document `reuse_connections` profile option for dbt-clickhouse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the `reuse_connections` option (default `True`) to the dbt profile.yml configuration table. When set to `False`, dbt closes the underlying connection at the end of each model so the next model opens a fresh TCP connection — useful on multi-replica ClickHouse Cloud services where the load balancer routes by TCP connection and a long-lived pool would otherwise pin a `dbt run` to a single replica. Tracks ClickHouse/dbt-clickhouse#669 / ClickHouse/dbt-clickhouse#670. --- .../data-ingestion/etl-tools/dbt/features-and-configurations.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/integrations/data-ingestion/etl-tools/dbt/features-and-configurations.md b/docs/integrations/data-ingestion/etl-tools/dbt/features-and-configurations.md index 22e5e860376..838fc0825b2 100644 --- a/docs/integrations/data-ingestion/etl-tools/dbt/features-and-configurations.md +++ b/docs/integrations/data-ingestion/etl-tools/dbt/features-and-configurations.md @@ -51,6 +51,7 @@ your_profile_name: local_db_prefix: [] # Database prefix of local tables on shards for distributed materializations. If empty, it uses the same database as the distributed table. allow_automatic_deduplication: [False] # Enable ClickHouse automatic deduplication for Replicated tables tcp_keepalive: [False] # Native client only, specify TCP keepalive configuration. Specify custom keepalive settings as [idle_time_sec, interval_sec, probes]. + reuse_connections: [True] # Re-use the same connection across models. Set to `False` to close the connection at the end of each model — useful on multi-replica ClickHouse Cloud services where the load balancer routes by TCP connection. custom_settings: [{}] # A dictionary/mapping of custom ClickHouse settings for the connection - default is empty. database_engine: '' # 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). threads: [1] # Number of threads to use when running queries. Before setting it to a number higher than 1, make sure to read the [read-after-write consistency](#read-after-write-consistency) section.