-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[vars] [false negatives] Changes in used variables do not cause models to be selected by state:modified
#4304
Comments
@CyberShadow Thanks for opening the issue! I think the previous issue we had to track this (#2704) was closed, on account of being mostly (though not entirely) resolved. We just recently did a bunch of work to capture There's a lot of overlap between that work, and what we'd need to support this in
This is a totally fair question! We want To that end, I'm starting to think that changes in So, to turn the question around: Could you say more about your use case? What sorts of changes are you hoping to test in CI, or capture in production, that depend on vars or env vars? |
Hey, thank you for the detailed response! Good to know about Thank you for the insight about I'm happy to talk about our use case :) One part of the topic I'm working on right now is reproducibility of our data transformation pipelines, i.e., the ability to re-run previous pipelines and obtain the exact same result. This will make it easier to reproduce past problems in order to understand and debug them. As part of this, the approach I was considering was that each time we receive updated data, it would be assigned a version identifier, with that version of the data being immutable henceforth. This data version identifier to use would then be passed to dbt as a var, which would then be expanded to the fully-qualified name of some table or snapshot in the SQL template. You can probably see where this is going: if the specified data version to use is changed, then all models that use that data source should also be re-run. So, from this point of view, it would make sense if a change in a variable's value causes models which use it to be considered modified; but, I also understand your perspective where vars indicate environmental configuration, changes in which should not signal modifications. Hope this helps! |
Hi there, We are experiencing the exact same issue where once a variable is changed in the dbt_project.yml file the downstream models which reference the variable are not ran when calling It sounds like Hope this can be implemented in the future! |
We are also experiencing the same limitations, so, unfortunately, because we are using some vars in our models, we cannot use the @jtcohen6, any update about this feature? |
Im my case, we use the DBT grant feature to manage access in BigQuery roll level security, and every time we include a new Service Account or user to the list all models are set to |
I've come around from some of the hesitations I expressed above (back in Nov 2021). I do think this would be desirable, and we can make it configurable for end users based on a subselector. The prerequisite for this work is capturing I'm going to mark this issue a |
state:modified
state:modified
state:modified
state:modified
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
This change is reverted in #10813 due to it would cause new parsing error in project that would work before. So reopening the issue. |
Hi there,
In https://docs.getdbt.com/reference/node-selection/state-comparison-caveats, it is stated:
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!
The text was updated successfully, but these errors were encountered: