-
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
fix overriding a disabled model in a package #391
Conversation
dbt/parser.py
Outdated
flat_graph, | ||
target_model_name, | ||
target_model_package) | ||
# first, look for a model that matches the current |
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.
@cmcarthur I'm kind of surprised this works! I think the ref resolution order we want is:
- "top-level" project
- The node's package
- All packages
Does that seem right to you?
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.
That precedence seems sane to me. I'll update this. The use case here is that a model in a package uses {{ref('dep')}}
and then you can override dep in your project, right?
This also doesn't work quite right as I think more about it -- what you want is to continue to the next option if the one you found is disabled. @drewbanin if you have time this afternoon let's discuss
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! Great work, approved
@drewbanin this adds a test & fix for overriding a disabled model from a package in the current project