Skip to content
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

[Feature] Include analyses in dbt list -s "fqn:*" #9693

Closed
3 tasks done
dbeatty10 opened this issue Feb 28, 2024 · 2 comments
Closed
3 tasks done

[Feature] Include analyses in dbt list -s "fqn:*" #9693

dbeatty10 opened this issue Feb 28, 2024 · 2 comments
Labels
Impact: CA stale Issues that have gone stale

Comments

@dbeatty10
Copy link
Contributor

dbeatty10 commented Feb 28, 2024

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

User story

As a developer on a dbt project, I sometimes want to define a selector in terms of "include everything except for ..." so that it is easy to write and includes precisely the desired nodes.

Known examples

One use case is defining a series of selectors that partition a dbt project. To make sure that everything is covered, the final selector would be defined as "everything that isn't one of the previously defined selectors".

Proposed solution

The easiest way to fulfill the user story above is to have a selection method that will select "all nodes". The most natural way to do that would be via "fqn:*" (as long as all node / resource types are included).

Describe the feature

When running dbt list -s "fqn:*", include all sources in the output.

For example, suppose I have project files like described in dbt-labs/docs.getdbt.com#4492 (comment).

If I have the following source definition within analyses/my_analysis.sql, then I'd expect to be able to use the fqn method to select it.

select 1 as id

Describe alternatives you've considered

Currently, analyses are not included by the fqn method like this:

dbt list -s "fqn:*"

Output:

01:09:56  Running with dbt=1.7.8
01:09:57  Registered adapter: postgres=1.7.8
01:09:57  Found 1 seed, 1 snapshot, 2 models, 1 analysis, 1 test, 1 source, 1 exposure, 1 metric, 401 macros, 1 group, 1 semantic model
exposure:my_project.my_exposure
metric:my_project.my_metric
my_project.metricflow_time_spine
my_project.my_model
my_project.my_seed
semantic_model:my_project.my_semantic_model
my_project.my_snapshot.my_snapshot
my_project.not_null_my_model_id

However, they are included in the output of this command:

dbt list --resource-types all

Output:

01:10:31  Running with dbt=1.7.8
01:10:32  Registered adapter: postgres=1.7.8
01:10:32  Found 1 seed, 1 snapshot, 2 models, 1 analysis, 1 test, 1 source, 1 exposure, 1 metric, 401 macros, 1 group, 1 semantic model
my_project.analysis.my_analysis
exposure:my_project.my_exposure
metric:my_project.my_metric
my_project.metricflow_time_spine
my_project.my_model
my_project.my_seed
semantic_model:my_project.my_semantic_model
my_project.my_snapshot.my_snapshot
source:my_project.my_src.my_seed
my_project.not_null_my_model_id

Who will this benefit?

Here's an example of using creating a default to selector that is meant to include everything certain models:

#9678 (comment)

The user would like to use fqn:* to start with "everything" and then add specific exclusions from there.

Are you interested in contributing this feature?

No response

Anything else?

See also: #9692

Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues that have gone stale label Sep 18, 2024
Copy link
Contributor

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impact: CA stale Issues that have gone stale
Projects
None yet
Development

No branches or pull requests

2 participants