-
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
make full refresh a config item #2438
Conversation
bfd3fd8
to
13a66f5
Compare
Added integration tests, fixed existing tests
13a66f5
to
0fa9d0a
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.
One tiny comment about an arg that I don't think matters, but this otherwise LGTM!
|
||
|
||
{% macro should_full_refresh() %} | ||
{% set config_full_refresh = config.get('full_refresh', false) %} |
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 think the second arg to config.get
is the validator, right? Do we even want to supply that here?
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.
Oops, I always forget it's not just a dict!
@@ -8,6 +8,6 @@ | |||
{{ return(relation is not none | |||
and relation.type == 'table' | |||
and model.config.materialized == 'incremental' | |||
and not flags.FULL_REFRESH) }} | |||
and not should_full_refresh()) }} |
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.
⭐ ⭐ ⭐
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.
fyi #2441 :)
Ship it!
resolves #1009
Description
This PR makes full refresh a config item (
full_refresh
) in addition to a flag--full-refresh
/flags.FULL_REFRESH
. The config item can be True, False, or None, and if it's True or False that overrides the flag.I updated dbt's included materializations to check a new macro that examines both the model config and the flag.
Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.