From 73944d28cc88107d5cc323c9c2b97dbf3bf89858 Mon Sep 17 00:00:00 2001 From: Shlomi Hafif Date: Wed, 1 Jun 2022 08:49:21 +0300 Subject: [PATCH 1/2] fix merge tree engine condition --- dbt/include/clickhouse/macros/adapters.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/clickhouse/macros/adapters.sql b/dbt/include/clickhouse/macros/adapters.sql index 64e76c0b..7166b345 100644 --- a/dbt/include/clickhouse/macros/adapters.sql +++ b/dbt/include/clickhouse/macros/adapters.sql @@ -41,7 +41,7 @@ 'Hive' ] -%} - {%- if engine is none or engine.endswith(('MergeTree', 'MergeTree()')) or engine in supported %} + {%- if engine is none or any(engine_type in engine for engine_type in ['MergeTree', 'MergeTree()']) or engine in supported %} {%- if cols is not none %} {%- if cols is string -%} {%- set cols = [cols] -%} From 3f6be94c572c120ba3aa1ff4a3029cab90f3149a Mon Sep 17 00:00:00 2001 From: Shlomi Hafif Date: Thu, 2 Jun 2022 09:47:48 +0300 Subject: [PATCH 2/2] simplify condition --- dbt/include/clickhouse/macros/adapters.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/clickhouse/macros/adapters.sql b/dbt/include/clickhouse/macros/adapters.sql index 7166b345..52190cf4 100644 --- a/dbt/include/clickhouse/macros/adapters.sql +++ b/dbt/include/clickhouse/macros/adapters.sql @@ -41,7 +41,7 @@ 'Hive' ] -%} - {%- if engine is none or any(engine_type in engine for engine_type in ['MergeTree', 'MergeTree()']) or engine in supported %} + {%- if engine is none or 'MergeTree' in engine or engine in supported %} {%- if cols is not none %} {%- if cols is string -%} {%- set cols = [cols] -%}