-
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
Add current package selection syntax #9270
Add current package selection syntax #9270
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9270 +/- ##
==========================================
- Coverage 88.22% 88.14% -0.08%
==========================================
Files 181 181
Lines 22643 22645 +2
==========================================
- Hits 19976 19961 -15
- Misses 2667 2684 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
@barton996 Thank you for this PR! :)
@aranke and I revisited the question of what syntax makes most sense here, and after some more discussion, we think we prefer package:this
over package:.
(despite what I said a year ago). If you're amenable to that change, let's make it happen.
Co-authored-by: Jeremy Cohen <[email protected]>
resolves #6891
Problem
There are many use cases where it is useful to exclude models not in your package from your run selection.
There is no easy way to limit your selection to just models in your project without resorting to hardcoding in package names.
Solution
This change adds 'this' as a valid package selector, enabling statements like
dbt ls -s package:this
Running the selector above will return just the models from the current project.
User documentation
User docs for this feature should be added here:
https://docs.getdbt.com/reference/node-selection/methods#the-package-method
The examples can be updated to look like this:
Checklist