Skip to content

Commit

Permalink
Merge branch 'current' into dbeatty/6132-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeatty10 authored Oct 1, 2024
2 parents 85843a8 + 364da5b commit 9e9d838
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion website/docs/reference/global-configs/resource-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@ id: "resource-type"
sidebar: "resource type"
---

The `--resource-type` and `--exclude-resource-type` flags include or exclude resource types from the `dbt build`, `dbt clone`, and `dbt list` commands.
<VersionBlock lastVersion="1.8">

The `--resource-type` and `--exclude-resource-type` flags include or exclude resource types from the `dbt build`, `dbt clone`, and `dbt list` commands. In Versionless and from dbt v1.9 onwards, these flags are also supported in the `dbt test` command.

</VersionBlock>

<VersionBlock firstVersion="1.9">

The `--resource-type` and `--exclude-resource-type` flags include or exclude resource types from the `dbt build`, `dbt test`, `dbt clone`, and `dbt list` commands.

</VersionBlock>

This means the flags enable you to specify which types of resources to include or exclude when running the commands, instead of targeting specific resources.

Expand Down Expand Up @@ -109,3 +119,27 @@ Instead of targeting specific resources, use the `--resource-flag` or `--exclude
</File>

</VersionBlock>

<VersionBlock firstVersion="1.9">

- In this example, use the following command to exclude _all_ unit tests when running tests:

<File name='Usage'>

```text
dbt test --exclude-resource-type unit_test
```

</File>

- In this example, use the following command to include all data tests when running tests:

<File name='Usage'>

```text
dbt test --resource-type test
```

</File>

</VersionBlock>

0 comments on commit 9e9d838

Please sign in to comment.