dbt-labs / dbt-labs/dbt

[CT-3314] [Feature] Support `project` as an alias for `package` selection method

Open
#8,986 2 comments 0 reactions 1 assignee Claimed by @ash2shukla View on GitHub
engine:v1 multi_project type:feature type:good-first-issue
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

### Is this your first time submitting a feature request?

- [X] I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
- [X] I have searched the existing issues, and I could not find an existing issue for this feature
- [X] 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?

https://github.com/dbt-labs/dbt-core/blob/7fddd6e448d9873da282b2ff7835ab39738d9663/core/dbt/graph/selector_methods.py#L437-L442

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.