Open jeremyyeo opened 5 months ago
Interesting that this is considered a bug because I wouldn't expect bar
to be modified (and wouldn't want it to run) if only the meta config is changed. If this becomes the default behavior of state:modified
I'd like a way of opting out.
Interesting that this is considered a bug because I wouldn't expect
bar
to be modified (and wouldn't want it to run) if only the meta config is changed. If this becomes the default behavior ofstate:modified
I'd like a way of opting out.
Yeah I don't really know for sure if it's a bug or a FR.
Confirming - this isn't a bug, it's an opinionated choice we made long long ago that:
tags
+ meta
are not considered "modifications" per se, they are metadata updates onlydescription
is a "modification" if and only if persist_docs
is enabled, otherwise it's only a metadata updateconfig
change is a modification, because that config might be used while materializing the modelIn retrospect, I think that can lead to situations like this one, where the outcome is technically correct but less unintuitive. Still, this is how it's been for many years.
This is a bug from our perspective because of the added interaction of the dbt_snow_mask
package. If we add masking via models[].columns[].meta.masking_policy
, right now, it will not get applied unless we perform a full build.
I understand your perspective that meta
is just documentation. What we have here though are processes that key off of meta
data.
From their "How to apply masking policy?" documentation:
models:
- name: stg_customer
columns:
- name: email
meta:
masking_policy: mp_encrypt_pii
References:
tags
+meta
are not considered "modifications" per se, they are metadata updates onlydescription
is a "modification" if and only ifpersist_docs
is enabled, otherwise it's only a metadata update
In the example, the only change is to update a meta config to both models just at different levels, not description change. So the way dbt is currently functioning is model level meta tags ARE seen as modifications however column level meta tags are not. It is still unclear why a metadata update at the model level would be considered different than a column level meta update.
Is this a new bug in dbt-core?
Current Behavior
As title, changes to column level
meta
configs aren't consideredstate:modified
.Expected Behavior
Changes to column level
meta
configs should be consideredstate:modified
.Steps To Reproduce
schema.yml
file (a model level change onfoo
, and a column level change onbar
):Relevant log output
Environment
Which database adapter are you using with dbt?
postgres
Additional Context
Not 100% sure if this has ever worked - could be FR like https://github.com/dbt-labs/dbt-core/issues/10020