For example, a parsed node is considered modified if (and only if), one of the following has changed:
body
config
persisted description
fqn
database representation
contract
Models extend parsed nodes to also include:
ref representation
But generic data tests use the the following criteria instead:
config
fqn
Unit tests use:
checksum
Macros:
macro sql
Documentation ("docs blocks"):
block contents
Sources:
database_representation
fqn
config
quoting
freshness
external
Exposures:
fqn
exposure_type
owner
maturity
url
description
label
depends_on
config
Metric:
filter
metadata
type
type params
description
label
config
Semantic model:
model
description
defaults
entities
dimensions
measures
config
primary entity
group
Saved query:
metrics
group by
description
where
label
config
group
exports
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.
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 bycheck_modified_content
which uses the definition ofsame_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 thedbt-bigquery
adapter definespolicy_tags
on one of its columns and then changes it subsequently, it will not affect the calculation ofstate:modified
.