method:value syntax. While it’s advisable to explicitly denote the method, you can omit it, and the default will be one of path, file, or fqn.
Most selector methods below support unix-style wildcards:
Below are examples of several popular selector methods:
“tag” Method
Use thetag: method select models with a specified tag.
”source” Method
Use thesource: method to select models that reference a specified source.
”resource_type” method
Use theresource_type method to select nodes of a specific type (ex. model, test, exposure, etc.)
“path” method
Usepath method to select models/sources defined at or under a specific path.
”file” method
Usefile method to select a model by filename.
”fqn” method
Use ‘fqn’ to select nodes based off their “fully qualified name” (FQN). The default FQM format includes the dbt project name, subdirectories, and the file name”package” method
Usepackage method to select models defined within the root project or an installed dbt package.
”config” method
Useconfig to select models that match a specified node config.
config method work for non-string values, such as: booleans, dictionary keys, values in arrays, etc.
Suppose you have a model with the following configurations:
config method to select the following:
“test_type” method
Usetest_type to select tests based on type (singular or generic)
”test_name” method
Usetest_name method to select tests based on the name of the test defined.
”state” method
When using the “state” method in a Bolt schedule of type Deferred or Turbo-CI, you don’t need to pass the
--state path/to/project/artifacts to your dbt command.Paradime will point to the artifacts based on the Bolt schedule configurations:- Deferred schedule
- Last run type
--state flag or the DBT_STATE environment variable.
state:new: Indicates there is no node with the sameunique_idin the comparison manifest.state:modified: Includes all new nodes and any changes to existing nodes.
modified criteria:
state:modified.body: Changes to node body (e.g. model SQL, seed values)state:modified.configs: Changes to any node configs, excludingdatabase/schema/aliasstate:modified.relation: Changes todatabase/schema/alias(the database representation of this node), irrespective oftargetvalues orgenerate_x_namemacrosstate:modified.persisted_descriptions: Changes to relation- or column-leveldescription, if and only ifpersist_docsis enabled at each levelstate:modified.macros: Changes to upstream macros (whether called directly or indirectly by another macro)state:modified.contract: Changes to a model’s contract, which currently include thenameanddata_typeofcolumns. Removing or changing the type of an existing column is considered a breaking change, and will raise an error.
state:modified includes all of the criteria above, as well as some extra resource-specific criteria, such as modifying a source’s freshness or quoting rules or an exposure’s maturity property.
There are two additional state selectors that complement state:new and state:modified by representing the inverse of those functions:
state:old— A node with the sameunique_idexists in the comparison manifeststate:unmodified— All existing nodes with no changes
”exposure” method
Useexposure method to select the parent resources of an exposure.
“metric” method
Usemetric method to select parent resources of a metric.
”results” method
When using the “results” method in a Bolt schedule of type Deferred or Turbo-CI, you don’t need to pass the
--state path/to/project/artifacts to your dbt command.Paradime will point to the artifacts based on the Bolt schedule configurations:- Deferred schedule
- Last run type
result method to select resources based on their results status from a previous execution.
seed, test, run, build.) was performed prior.
“source_status” method
When using the “source_status” method in a Bolt schedule of type Deferred or Turbo-CI, you don’t need to pass the
--state path/to/project/artifacts to your dbt command.Paradime will point to the artifacts based on the Bolt schedule configurations:- Deferred schedule
- Last run type
source_status from a prior dbt invocation. For instance, after running dbt source freshness, dbt generates the sources.json artifact, which includes execution times and max_loaded_at dates for dbt sources.
The following dbt commands produce sources.json artifacts whose results can be referenced in subsequent dbt invocations:
dbt source freshness
“group” method
Usegroup method to select models defined within a specified group.
“access” Method
Useaccess method to select models based on their access property.
“version” Method
Useversion to select versioned models based on the following:
- Version Identifier: A specific version label or number (
old,prerelease,latest) - Latest Version: The most recent version of a model.
”semantic_model” Method
Usesemantic_model method to selects semantic models.
”saved_query” method
Usesaved_query method to selects saved queries.
”unit_test” method
Useunit_test method to selects dbt™️ unit tests.