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-flag
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-type
flag:Usagedbt build --resource-type saved_query