-
Notifications
You must be signed in to change notification settings - Fork 134
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-767] [Bug] Model's contract validation fails on query data types change #861
Comments
Thanks for reporting this and opening up an associated PR @dementiev27 ! Maybe the BigQuery cache invalidation isn't working as we'd expect? It seems like BigQuery should invalidate its cache when an underlying table is rebuilt, but that doesn't appear to be happening. I was able to reproduce the scenario you reported, and those details are in the "Reprex" toggle immediately below.
|
Is this a new bug in dbt-bigquery?
Current Behavior
Model data types are being detected incorrectly due to empty query caching in BigQuery, resulting in contract validation errors.
To get column data types, DBT executes a query like this:
This query is cached in BigQuery, leading to incorrect data types detection in case of their change.
Expected Behavior
Model data types are detected correctly and contract validation works as expected.
Steps To Reproduce
customer_id
data type in thepayments
source table.Also, appropriately change the data type of
customer_id
for the model in the YAML config.customer_id
data type change, and you will get the error:Relevant log output
No response
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: