-
Notifications
You must be signed in to change notification settings - Fork 153
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
[ADAP-1061] [Regression] Source freshness never sends query and never finishes/fail if loaded_at_field is not specified #1044
Comments
Thanks for submitting this issue @rloredo! I've reproduced the behavior in a test case and attached that PR to this issue. @Fleid @dbeatty10 What would be the desired behavior in this scenario? Should we raise an error? Skip the test? Something else? We'll need to know this prior to resolving the issue. |
@mikealfare It sounds like the behavior in 1.6 is essentially "skip the source freshness test if If so, it would be reasonable to preserve that behavior in 1.7+. The alternative of essentially making So it seems like the most desireable behavior would be:
|
@dbeatty10 From a long-term perspective, is this not the desired behaviour for this scenario? Because if someone has a source with a freshness check defined but without a Related, I agree that making a change of this nature is not what a patch release is for. In that case, is it better to have two actions as a result of this issue?
|
Thanks for bringing up your thoughts on short-term and long-term approaches @pgoslatara 🧠 !
Yep, this is what we have queued up (along with explicitly raising a warning when
We don't want to take introducing a breaking change lightly, and so it largely depends on the trade-offs. Trade-offsSince at least May 2020, our documentation for source freshness has said something like this:
In one case, a user could be surprised that no source freshness is executed when In another case, a user could have intentionally omitted one of the required fields and relied on the behavior described in the documentation. DecisionAlthough we may re-assess this again at some point in the future, we'd rather not introduce a change that forces a breaking change at this point in time. Rather, our approach to reduce the impact of the "surprise factor" is by raising a warning when One driving factor is that the current behavior has been described in the documentation for several years. Another is that adding a warning can reduce the impact of accidentally omitting this field (which is in line with other warnings that dbt raises in similar scenarios). A lesser factor is the assumption that the developer adding the freshness check verified that they were able to induce both the warning and error states in their testing prior to merging. Otherwise, how would they know that |
I was also reminded after this that we specifically removed This context further supports @dbeatty10's direction above. Hopefully this helps. |
Opened dbt-labs/docs.getdbt.com#4615 to clarify calculating source freshness from metadata vs. the Acceptance criteriaFor adapters that do not support calculating source freshness from metadata:
For adapters that do support calculating source freshness from metadata, this should be a non-issue. |
@dbeatty10 I edited the issue description to include your comments above so they don't get overlooked. Given that this issue is particular to |
Since we've implemented metadata-based source freshness. This bug is effectively resolved. While it previously should have thrown an error or warning, it now produces a result since Closing as resolved. |
Is this a new bug in dbt-bigquery?
Current Behavior
With 1.7.2 if I remove loaded_at_field in a source freshness test, it logs that it started running the freshness test but never sends the query to BigQuery nor fails.
Expected Behavior
Fail and raise an error, or don't run that freshness test.
Steps To Reproduce
Using dbt-bigquery 1.7.2
With a source specified as:
Running
dbt source freshness
will run forever.
In dbt-bigquery 1.6.5 it just doesn't run.
Relevant log output
Environment
Additional Context
@mikealfare: Per @dbeatty10's comment:
Tasks
loaded_at_field
not required for source freshness checks as-of 1.7 docs.getdbt.com#4615The text was updated successfully, but these errors were encountered: