Closed tkiehn closed 2 months ago
@tkiehn , I got confirmation from dbt adapters (dbt labs) team that config precedence is managed by dbt-adapters/dbt-core. I will transfer this issue to dbt-adapters repo once my access to dbt-adapters is figured out.
@tkiehn , I was not able to transfer this issue. I created a new issue in dbt-adapters https://github.com/dbt-labs/dbt-core/issues/10711.
I am closing this issue as it with dbt-adapters. Please re-open issue in the future with more details.
Hi,
I have a model and in the model's .sql-file I have set
{{ config(materialized='incremental') }}
. In thedbt_project.yml
I set a materialization under the models key for the whole project like this:What I expect:
The materialization from the config-block supersedes the one from the
dbt_project.yml
.What I observe:
The value of
model.config.materialized
inside theis_incremental
-macro is the one set inside thedbt_project.yml
instead of the config block. The behaviour is same for views and tables as values for+materialized:
.is_incremental
then returnsfalse
, therefore dbt is always running in full-refresh-mode.Removal of setting the materialization in the
dbt_project.yml
fixed it and the model is correctly run in incremental mode because the value ofmodel.config.materialized
isincremental
.Kind Regards Theo