diff --git a/dbt/adapters/clickhouse/dbclient.py b/dbt/adapters/clickhouse/dbclient.py index 65ee1c64..31037f36 100644 --- a/dbt/adapters/clickhouse/dbclient.py +++ b/dbt/adapters/clickhouse/dbclient.py @@ -150,7 +150,8 @@ def _server_version(self): pass def update_model_settings(self, model_settings: Dict[str, str], materialization_type: str): - model_settings_to_add = copy.deepcopy(self._model_settings[materialization_type]) + settings = self._model_settings.get(materialization_type, {}) + model_settings_to_add = copy.deepcopy(settings) model_settings_to_add.update(self._model_settings['general']) for key, value in model_settings_to_add.items(): if key not in model_settings: