-
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
Add experimental cache_selected_only
config
#5036
Conversation
rename flag to cache_selected_only, update postgres adapter: function _relations_cache_for_schemas
cache_selected_only
config
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.
Looks good! I see there's only a test for the flag setting not the caching though.
@gshank You're right :) This is definitely going to be "experimental" / "use at your own risk," but worth at least one test. I did a bad thing, and just extended an old test for caching, rather than converting. |
Changing an existing test is perfectly legit :) They ought to behave the same... |
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.
Late to the party but this looks great!
* cache schema for selected models * Create Features-20220316-003847.yaml * rename flag, update postgres adapter rename flag to cache_selected_only, update postgres adapter: function _relations_cache_for_schemas * Update Features-20220316-003847.yaml * added test for cache_selected_only flag * formatted as per pre-commit * Add breaking change note for adapter plugin maintainers * Fix whitespace * Add a test Co-authored-by: karunpoudel-chr <[email protected]> Co-authored-by: karunpoudel-chr <[email protected]>
* cache schema for selected models * Create Features-20220316-003847.yaml * rename flag, update postgres adapter rename flag to cache_selected_only, update postgres adapter: function _relations_cache_for_schemas * Update Features-20220316-003847.yaml * added test for cache_selected_only flag * formatted as per pre-commit * Add breaking change note for adapter plugin maintainers * Fix whitespace * Add a test Co-authored-by: karunpoudel-chr <[email protected]> Co-authored-by: karunpoudel-chr <[email protected]>
I realized this is a comment on an old PR, but I was experimenting today with |
resolves #4688
rebased version of #4860
more tracking + testing to come in #4961
Only other changes:
--cache-selected-only
(kebab case) instead of--cached_selected_only
(snake case)dbt-postgres
reimplements this method; all the others inherit the base version.I'd love to include this as "experimental" functionality in v1.1 if possible. We would document it as such: dbt-labs/docs.getdbt.com#1327
Checklist