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

Fix resource-type #5935

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 27 additions & 17 deletions website/docs/reference/global-configs/resource-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The available resource types are:
- [`semantic_model`](/docs/build/semantic-models)
- [`snapshot`](/docs/build/snapshots)
- [`source`](/docs/build/sources)
- [`data_test`](/docs/build/data-tests)
- [`test`](/docs/build/data-tests)
- [`unit_test`](/docs/build/unit-tests)

</VersionBlock>
Expand All @@ -64,38 +64,48 @@ Instead of targeting specific resources, use the `--resource-flag` or `--exclude

- For example, use the following command to include _all_ snapshots from your dbt build process:

<File name='Usage'>
<File name='Usage'>

```text
dbt build --resource-type snapshot
```
```text
dbt build --resource-type snapshot
```

</File>
</File>

<VersionBlock firstVersion="1.7">

- In this example, run the following command to include _all_ saved queries with the `--resource-type` flag:

<File name='Usage'>
<File name='Usage'>

```text
dbt build --resource-type saved_query
```
```text
dbt build --resource-type saved_query
```

</File>
</File>

</VersionBlock>

<VersionBlock firstVersion="1.8">

- In this example, use the following command to exclude _all_ unit tests, from your dbt build process. Note that the `--exclude-resource-type` flag is only available in dbt version 1.8 and higher:
- In this example, use the following command to exclude _all_ unit tests from your dbt build process. Note that the `--exclude-resource-type` flag is only available in dbt version 1.8 and higher:

<File name='Usage'>

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

</File>

- In this example, use the following command to include all data tests in your build process:

<File name='Usage'>
<File name='Usage'>

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

</File>
</File>

</VersionBlock>
Loading