Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dbeatty10 opened this issue Aug 4, 2024 · 1 comment
Labels
content Improvements or additions to content dbt Core The changes proposed in this issue relate to dbt Core size: medium This change will take up to a week to address

Comments

@dbeatty10
Copy link
Contributor

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

dbt-labs/dbt-bigquery#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:

  • 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.

@dbeatty10 dbeatty10 added content Improvements or additions to content dbt Core The changes proposed in this issue relate to dbt Core labels Aug 4, 2024
@nataliefiann nataliefiann added the size: medium This change will take up to a week to address label Sep 16, 2024
@nataliefiann
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content dbt Core The changes proposed in this issue relate to dbt Core size: medium This change will take up to a week to address
Projects
None yet
Development

No branches or pull requests

2 participants