Skip to content

Commit

Permalink
Select resources with the source resource_type (#4145)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Sep 28, 2023
2 parents 441b642 + 2eb1316 commit 067b228
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion website/docs/reference/node-selection/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,19 @@ The `source` method is used to select models that select from a specified [sourc
```

### The "resource_type" method
Use the `resource_type` method to select nodes of a particular type (`model`, `source`, `exposure`, etc). This is similar to the `--resource-type` flag used by the [`dbt ls` command](/reference/commands/list).
Use the `resource_type` method to select nodes of a particular type (`model`, `test`, `exposure`, and so on). This is similar to the `--resource-type` flag used by the [`dbt ls` command](/reference/commands/list).

```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
```

### The "path" method
The `path` method is used to select models/sources defined at or under a specific path.
Model definitions are in SQL/Python files (not YAML), and source definitions are in YAML files.
Expand Down

0 comments on commit 067b228

Please sign in to comment.