From a63cbd75b390767b621d9ff47802271896358d89 Mon Sep 17 00:00:00 2001 From: bentsileviav Date: Tue, 13 Feb 2024 12:30:07 +0200 Subject: [PATCH] always return --end_of_sql when asking for settings --- dbt/adapters/clickhouse/impl.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/dbt/adapters/clickhouse/impl.py b/dbt/adapters/clickhouse/impl.py index 09047502..e87ab906 100644 --- a/dbt/adapters/clickhouse/impl.py +++ b/dbt/adapters/clickhouse/impl.py @@ -412,14 +412,11 @@ def get_model_settings(self, model): res = [] for key in settings: res.append(f' {key}={settings[key]}') - if len(res) == 0: - return '' - else: - settings_str = 'SETTINGS ' + ', '.join(res) + '\n' - return f""" - -- end_of_sql - {settings_str} - """ + settings_str = '' if len(res) == 0 else 'SETTINGS ' + ', '.join(res) + '\n' + return f""" + -- end_of_sql + {settings_str} + """ @available def get_model_query_settings(self, model):