From 4f3d679a6824816649244a3014e8d10e34d5c7f4 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:33:44 -0600 Subject: [PATCH] This works starting v1.6: `--select resource_type:source` (#6115) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Preview](https://docs-getdbt-com-git-dbeatty10-patch-3-dbt-labs.vercel.app/reference/node-selection/methods#the-resource_type-method) ## What are you changing in this pull request and why? Prior to dbt v1.6, `--select resource_type:source` wasn't an option, and this was the alternative: ```bash dbt list --resource-type source ``` But now that it's available for all supported versions of dbt, we can update the docs to remove this caveat. ## 🎩 Before: image After: image ## Checklist - [x] I have reviewed the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. Co-authored-by: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> --- website/docs/reference/node-selection/methods.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/website/docs/reference/node-selection/methods.md b/website/docs/reference/node-selection/methods.md index 37f50f734e7..38484494e4b 100644 --- a/website/docs/reference/node-selection/methods.md +++ b/website/docs/reference/node-selection/methods.md @@ -44,13 +44,8 @@ Use the `resource_type` method to select nodes of a particular type (`model`, `t ```bash dbt build --select "resource_type:exposure" # build all resources upstream of exposures -dbt list --select "resource_type:test" # list all tests in your project -``` - -Note: This method doesn't work for sources, so use the [`--resource-type`](/reference/commands/list) option of the list command instead: - - ```bash -dbt list --resource-type source +dbt list --select "resource_type:test" # list all tests in your project +dbt list --select "resource_type:source" # list all sources in your project ``` ### The "path" method