Resource type
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.
The --exclude-resource-type flag is only available in dbt version 1.8 and higher. If you're using older versions, this flag won't be available.
The available resource types are:
Example
Instead of targeting specific resources, use the --resource-type or --exclude-resource-type flags to target all resources of a certain type: dbt build --resource-type RESOURCE_TYPE replacing RESOURCE_TYPE with the resource type you want to include.
-
For example, use the following command to include all snapshots from your dbt build process:
Usagedbt build --resource-type snapshot -
In this example, run the following command to include all saved queries with the
--resource-typeflag:Usagedbt build --resource-type saved_query -
In this example, use the following command to exclude all unit tests from your dbt build process. Note that the
--exclude-resource-typeflag is only available in dbt version 1.8 and higher:Usagedbt build --exclude-resource-type unit_test -
In this example, use the following command to include all data tests in your build process:
Usagedbt build --resource-type test