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

New state:modified.vars selection method #6222

Draft
wants to merge 14 commits into
base: current
Choose a base branch
from
Draft

Conversation

dbeatty10
Copy link
Contributor

@dbeatty10 dbeatty10 commented Oct 2, 2024

Preview

Closes: #6202

What are you changing in this pull request and why?

state:modified.vars is a new selector, opt-in method behind the state_modified_compare_vars behavior flag (off by default).

Details

  • This PR incorporates the changes in Add vars to state comparison caveats #6224.
  • Add this content to behavior changes page as its own section and a row in this table:

    Set the state_modified_compare_vars to True if a model uses a var or env_var in its definition. dbt will be able to identify its lineage to include the model in state:modified because the var or env_var value has changed.

Checklist

…ate_modified_compare_vars behavior` flag (off by default)
Copy link

vercel bot commented Oct 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview Oct 3, 2024 9:32pm

@github-actions github-actions bot added content Improvements or additions to content size: x-small This change will take under 3 hours to fix. labels Oct 2, 2024
@dbeatty10 dbeatty10 marked this pull request as ready for review October 2, 2024 21:59
@dbeatty10 dbeatty10 requested a review from a team as a code owner October 2, 2024 21:59
@@ -210,6 +210,7 @@ Because state comparison is complex, and everyone's project is different, dbt su
- `state:modified.relation`: Changes to `database`/`schema`/`alias` (the database representation of this node), irrespective of `target` values or `generate_x_name` macros
- `state:modified.persisted_descriptions`: Changes to relation- or column-level `description`, _if and only if_ `persist_docs` is enabled at each level
- `state:modified.macros`: Changes to upstream macros (whether called directly or indirectly by another macro)
- `state:modified.vars`: Changes to [`vars`](/docs/build/project-variables) that a node depends on (available in v1.9 or with [dbt Cloud Versionless](/docs/dbt-versions/upgrade-dbt-version-in-cloud#versionless) via the `state_modified_compare_vars` [behavior flag](/reference/global-configs/behavior-changes))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this vars + env_vars? or just vars?

Copy link
Collaborator

@runleonarun runleonarun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment

website/docs/reference/node-selection/methods.md Outdated Show resolved Hide resolved
@dbeatty10 dbeatty10 marked this pull request as draft October 2, 2024 23:18
Co-authored-by: Leona B. Campbell <3880403+runleonarun@users.noreply.github.com>
@github-actions github-actions bot added size: small This change will take 1 to 2 days to address and removed size: x-small This change will take under 3 hours to fix. labels Oct 3, 2024
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 size: small This change will take 1 to 2 days to address
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core] state_modified_compare_vars behavior flag
3 participants