-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix run repeatability/caching issues (#1138, #1139, #1140) #1144
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this out a bunch on Snowflake and Redshift. Everything worked as expected, and the logs (with --log-cache-events
) all checked out.
Just for my understanding, you mentioned:
One thing that's a bit weird is that added nodes now show up in
list_relations
as their inserted text (though with proper quoting fields).
Can you give me an example of what that would look like in practice? I think it's ok, but just want to confirm.
Sure! The easy example is on snowflake so I'll use that. Imagine you have Calling With this cache, when you call |
ok, thanks! That's really helpful. I think dbt has to work this way. It would be wholly unreasonable for us to predict the exact casing that Snowflake will pick. The user might set quoted_identifier_ignore_case to |
This fixes a number of issues discovered in 0.12.1. Two are sinter-only issues, and one is a kind of egregious (but in practice mostly benign) bug around case comparisons that almost entirely manifests in snowflake.
I had a heck of a time reproducing user reports, and the new integration tests have to really dig into the cache a bit more than I'd like, but I do believe this fixes #1140 and the tests will catch any regressions.
Basically, cache dict keys are now always lowercased, and access to fields from the inner Relation are also lowercased, but the underlying Relation representation is not.
One thing that's a bit weird is that added nodes now show up in
list_relations
as their inserted text (though with proper quoting fields). dbt seems to handle that well and the tests are okay, but it is a potential source of issues for things that inspectlist_relations
output. I don't see a way around that without trying to guess what the db would do to your relation names, which we discussed in slack and decided is not a great plan.