-
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
Expose the cache in dbt's rendering contexts (#1683) #1770
Expose the cache in dbt's rendering contexts (#1683) #1770
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.
This broadly looks good to me, but I added one comment worth discussing here.
make new cache manipulation methods mark the methods available to the sql context move cache manipulation into appropriate macros and methods update the changelog fix some type checking
Materializations now return a list of relations they added - those get added to the cache Updated existing materializations Added backwards compatibility support + a deprecation warning
1946b2f
to
145e0b2
Compare
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 added a link for the deprecation warning -- this is ready to merge once that's updated!
Include the actual docs link! Co-Authored-By: Drew Banin <drew@fishtownanalytics.com>
Fixes #1683
Expose some cache manipulation methods to materializations and macros. As part of that I moved around where we do our cache changes in dbt itself. This is a breaking change - I've updated the changelog accordingly.
I also spent some time/energy getting mypy happy with this part of the code.
I'm not sure, but it's possible that we should be stubbing these out during parsing with
@available.parse_none
instead of just@available
.