-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
enhancementNew feature or requestNew feature or requestgood_first_issueStraightforward + self-contained changes, good for new contributors!Straightforward + self-contained changes, good for new contributors!multi_project
Description
Is this your first time submitting a feature request?
- I have read the expectations for open source contributors
- I have searched the existing issues, and I could not find an existing issue for this feature
- I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion
Describe the feature
Let's support project
as an alias for package
when selecting nodes from a specific project.
https://docs.getdbt.com/reference/node-selection/methods#the-package-method
https://docs.getdbt.com/docs/collaborate/govern/project-dependencies
If you're in a dbt project that's taken a dependency on another dbt project:
- via "package"-type dependency: this will select all nodes in the package
- via "project"-type dependency: this will select only public models from the upstream project, imported as metadata only
Describe alternatives you've considered
Not doing this, sticking with the current language
Who will this benefit?
Less confusion for users of dbt Mesh. Why do I need to type dbt list -s package:upstream_project+
, if I've intentionally chosen to depend on upstream_project
as a "project" rather than a "package"?
Are you interested in contributing this feature?
sure!
Anything else?
dbt-core/core/dbt/graph/selector_methods.py
Lines 437 to 442 in 7fddd6e
class PackageSelectorMethod(SelectorMethod): | |
def search(self, included_nodes: Set[UniqueId], selector: str) -> Iterator[UniqueId]: | |
"""Yields nodes from included that have the specified package""" | |
for node, real_node in self.all_nodes(included_nodes): | |
if fnmatch(real_node.package_name, selector): | |
yield node |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood_first_issueStraightforward + self-contained changes, good for new contributors!Straightforward + self-contained changes, good for new contributors!multi_project