-
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
Ambiguity in --models flag fails fails to select models correctly #1023
Comments
Is there perhaps something more to this issue? I've set up a project exactly as described in steps to reproduce (ok, I added a version and a profile to the project file, but that shouldn't matter), and can't reproduce this failure on 0.11.1 or the most recent revision of dev/guion-bluford. |
Meep! Sorry for the inaccurate writeup @beckjake. This actually happens in a slightly different scenario. Given:
This works:
This does not work:
I think the matching
worked in the example above. |
…-flag Fix ambiguous models flag (#1023)
Having a similar problem: Over time this DAG has become very convoluted. I am therefore rebuilding the project parallel to this one in a folder: I want the original project to keep running as usual, but not run the new one I am building as part of the main schedule.
in the end, this worked: Likewise I tried all the below for the old/existing model command, all with errors:
in the end this worked. I am probably not asking anything - merely stating a difficult I encountered. I'll ask on the Slack community as well. |
Issue
Issue description
The
--models
selection syntax will prefer package-based selections over path-based selections, whereas it should instead support both. This model selection code uses an if/else if/else, but it should instead be three distinct if statements, I think. In particular, the nestedif is_selected_node()
branch inside of thepackage
branch "steals" the opportunity for selection away from theelse
block.Existing code:
Suggested changes (though other implementations will work and might be smarter):
I think the original if/else if/else implementation was meant as an optimization to short-circuit selection checks that we knew wouldn't match, but it seems like that is not the case.
Results
Models are not selected when they should be.
System information
0.11.1
Steps to reproduce
Given a project file:
And a model:
Running:
will not select any nodes. The
my_project
in the selector matches a package name, so dbt thinks the selection a fully qualified name for a model. Instead, it's a "locally" qualified name. You can make this work by doing:which is the fully-qualified name for this model.
The text was updated successfully, but these errors were encountered: