[vars] [false negatives] Changes in used variables do not cause models to be selected by `state:modified`
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
Hi there,
In https://docs.getdbt.com/reference/node-selection/state-comparison-caveats, it is stated:
> ### Vars
> If a model uses a `var` or `env_var` in its definition, dbt is unable today to identify that lineage in such a way that it can include the model in `state:modified` because the `var` or `env_var` value has changed.
I was wondering if there is an issue tracking this limitation; I searched for one and couldn't find one, so I hope it's OK that I opened this issue so that our team can follow its status. (If there was one and I missed it, apologies!)
Also, I apologize for the naive question, but would it not be easier, at least for the case where the desired effect is to re-run all changed models and their children, to check if the source code *after* preprocessing (Jinja macro expansion) has changed, instead of *before*? I would expect that this would automatically cause changes in variables to propagate to changes to the compiled code of the models, which would then indicate a need to re-run them.
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.