dbt-labs / docs.getdbt.com

The code behind docs.getdbt.com
https://docs.getdbt.com/
Apache License 2.0
117 stars 918 forks source link

[Core] Describe what contributes to `state:modified` for each resource type #5886

Open dbeatty10 opened 1 month ago

dbeatty10 commented 1 month ago

Link to the page(s) on docs.getdbt.com requiring updates

https://docs.getdbt.com/reference/node-selection/state-comparison-caveats

Tell us more about this update

Folks will often want to understand why a change is or isn't included in state:modified.

It would be great if we documented which things contribute (and possible some examples of which don't).

Reviewers/Stakeholders/SMEs

.

Related GitHub issues

https://github.com/dbt-labs/dbt-bigquery/issues/1192

Additional information

state:modified is determined by check_modified_content which uses the definition of same_contents (which often varies by node type).

For example, a parsed node is considered modified if (and only if), one of the following has changed:

Models extend parsed nodes to also include:

But generic data tests use the the following criteria instead:

Unit tests use:

Macros:

Documentation ("docs blocks"):

Sources:

Exposures:

Metric:

Semantic model:

Saved query:

Any other properties not listed above are not taken into account as it relates to state:modified. For example, if a model using the dbt-bigquery adapter defines policy_tags on one of its columns and then changes it subsequently, it will not affect the calculation of state:modified.

nataliefiann commented 2 days ago

I've assigned a medium label to this while we we go through v.1.9 issues but I imagine this will take a day or two to doc