From 84ca861c87feaa14be7d22ba3c88e1bc9ed0a518 Mon Sep 17 00:00:00 2001 From: the4thamigo-uk Date: Mon, 16 Oct 2023 17:30:58 +0100 Subject: [PATCH] cluster names containing dash characters (#198) --- dbt/adapters/clickhouse/dbclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/adapters/clickhouse/dbclient.py b/dbt/adapters/clickhouse/dbclient.py index 2ad197ba..320ea566 100644 --- a/dbt/adapters/clickhouse/dbclient.py +++ b/dbt/adapters/clickhouse/dbclient.py @@ -150,7 +150,7 @@ def _ensure_database(self, database_engine, cluster_name) -> None: db_exists = self.command(check_db) if not db_exists: engine_clause = f' ENGINE {database_engine} ' if database_engine else '' - cluster_clause = f' ON CLUSTER {cluster_name} ' if cluster_name is not None else '' + cluster_clause = f' ON CLUSTER "{cluster_name}" ' if cluster_name is not None else '' self.command(f'CREATE DATABASE {self.database}{cluster_clause}{engine_clause}') db_exists = self.command(check_db) if not db_exists: