dbt-bouncer
dbt-bouncer configuration file for enforcing conventions in dbt projects
| Type | object |
|---|---|
| File match |
dbt-bouncer.yml
dbt-bouncer.yaml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/dbt-bouncer/latest.json |
| Source | https://raw.githubusercontent.com/godatadriven/dbt-bouncer/main/schema.json |
Validate with Lintel
npx @lintel/lintel check
Properties
Path to a directory containing custom checks.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
If you want to run dbt-bouncer against a package.
Severity of the check, one of 'error' or 'warn'.
[]
[]
[]
Definitions
Columns must have a populated description.
Parameters: min_description_length (int | None): Minimum length required for the description to be considered populated.
Receives:
catalog_node (CatalogNodeEntry): The CatalogNodeEntry object to check.
manifest_obj (ManifestObject): The ManifestObject object parsed from manifest.json.
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml catalog_checks: - name: check_column_description_populated include: ^models/marts
yaml catalog_checks: - name: check_column_description_populated min_description_length: 25 # Setting a stricter requirement for description length
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Columns that match the specified regexp pattern must have a specified test.
Parameters: column_name_pattern (str): Regex pattern to match the column name. test_name (str): Name of the test to check for.
Receives:
catalog_node (CatalogNodeEntry): The CatalogNodeEntry object to check.
tests (list[TestNode]): List of TestNode objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml catalog_checks: - name: check_column_has_specified_test column_name_pattern: ^is_.* test_name: not_null
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Columns with the specified regexp naming pattern must have data types that comply to the specified regexp pattern or list of data types.
Note: One of type_pattern or types must be specified.
Raises: ValueError: If neither or both of type_pattern/types are supplied.
Parameters: column_name_pattern (str): Regex pattern to match the model name. type_pattern (str | None): Regex pattern to match the data types. types (list[str] | None): List of data types to check.
Receives: catalog_node (CatalogNodeEntry): The CatalogNodeEntry object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml catalog_checks: # DATE columns must end with "_date" - name: check_column_name_complies_to_column_type column_name_pattern: .*_date$ types: - DATE
yaml catalog_checks: # BOOLEAN columns must start with "is_" - name: check_column_name_complies_to_column_type column_name_pattern: ^is_.* types: - BOOLEAN
yaml catalog_checks: # Columns of all types must consist of lowercase letters and underscores. Note that the specified types depend on the underlying database. - name: check_column_name_complies_to_column_type column_name_pattern: ^[a-z_]*$ types: - BIGINT - BOOLEAN - DATE - DOUBLE - INTEGER - VARCHAR
yaml catalog_checks: # No STRUCT data types permitted. - name: check_column_name_complies_to_column_type column_name_pattern: ^[a-z_]*$ type_pattern: ^(?!STRUCT)
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Columns must have a name that matches the supplied regex.
Parameters: column_name_pattern (str): Regexp the column name must match.
Receives: catalog_node (CatalogNodeEntry): The CatalogNodeEntry object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml catalog_checks: - name: check_column_names column_name_pattern: [a-z_] # Lowercase only, underscores allowed
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
All columns in a model should be included in the model's properties file, i.e. .yml file.
Receives:
case_sensitive (bool | None): Whether the column names are case sensitive or not. Necessary for adapters like dbt-snowflake where the column in catalog.json is uppercase but the column in manifest.json can be lowercase. Defaults to false for dbt-snowflake, otherwise true.
catalog_node (CatalogNodeEntry): The CatalogNodeEntry object to check.
manifest_obj (ManifestObject): The ManifestObject object parsed from manifest.json.
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml catalog_checks: - name: check_columns_are_all_documented
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Columns should have a populated description in public models.
Receives:
catalog_node (CatalogNodeEntry): The CatalogNodeEntry object to check.
min_description_length (int | None): Minimum length required for the description to be considered populated.
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml catalog_checks: - name: check_columns_are_documented_in_public_models
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Exposures should depend on a model.
Parameters: maximum_number_of_models (int | None): The maximum number of models an exposure can depend on, defaults to 100. minimum_number_of_models (int | None): The minimum number of models an exposure can depend on, defaults to 1.
Receives: exposure (ExposureNode): The ExposureNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the exposure path (i.e the .yml file where the exposure is configured). Exposure paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the exposure path (i.e the .yml file where the exposure is configured). Only exposure paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_exposure_based_on_model
yaml manifest_checks: - name: check_exposure_based_on_model maximum_number_of_models: 3 minimum_number_of_models: 1
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Exposures should be based on public models only.
Receives: exposure (ExposureNode): The ExposureNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the exposure path (i.e the .yml file where the exposure is configured). Exposure paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the exposure path (i.e the .yml file where the exposure is configured). Only exposure paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_exposure_based_on_non_public_models
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Exposures should not be based on views.
Parameters: materializations_to_include (list[str] | None): List of materializations to include in the check.
Receives:
exposure (ExposureNode): The ExposureNode object to check.
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the exposure path (i.e the .yml file where the exposure is configured). Exposure paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the exposure path (i.e the .yml file where the exposure is configured). Only exposure paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_exposure_based_on_view
yaml manifest_checks: - name: check_exposure_based_on_view materializations_to_include: - ephemeral - my_custom_materialization - view
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
[
"ephemeral",
"view"
]
Upstream models must have a path that matches the provided upstream_path_pattern.
Parameters: upstream_path_pattern (str): Regexp pattern to match the upstream model(s) path.
Receives:
manifest_obj (ManifestObject): The manifest object.
model (ModelNode): The ModelNode object to check.
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_lineage_permitted_upstream_models include: ^models/staging upstream_path_pattern: $^ - name: check_lineage_permitted_upstream_models include: ^models/intermediate upstream_path_pattern: ^models/staging|^models/intermediate - name: check_lineage_permitted_upstream_models include: ^models/marts upstream_path_pattern: ^models/staging|^models/intermediate
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Seed cannot be referenced in models with a path that matches the specified include config.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_lineage_seed_cannot_be_used include: ^models/intermediate|^models/marts
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Sources cannot be referenced in models with a path that matches the specified include config.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_lineage_source_cannot_be_used include: ^models/intermediate|^models/marts
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Macro arguments must have a populated description.
Parameters: min_description_length (int | None): Minimum length required for the description to be considered populated.
Receives: macro (Macros): The Macros object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the macro path. Macro paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the macro path. Only macro paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_macro_arguments_description_populated
yaml # Only "common" macros need to have their arguments populated manifest_checks: - name: check_macro_arguments_description_populated include: ^macros/common
yaml manifest_checks: - name: check_macro_arguments_description_populated min_description_length: 25 # Setting a stricter requirement for description length
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
The raw code for a macro must not match the specified regexp pattern.
Parameters: regexp_pattern (str): The regexp pattern that should not be matched by the macro code.
Receives: macro (Macros): The Macros object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the macro path. Macro paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the macro path. Only macro paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: # Prefer `coalesce` over `ifnull`: [<https://docs.sqlfluff.com/en/stable/rules.html#sqlfluff.rules.sphinx.Rule_CV02](https://docs.sqlfluff.com/en/stable/rules.html#sqlfluff.rules.sphinx.Rule_CV02)> - name: check_macro_code_does_not_contain_regexp_pattern regexp_pattern: .*[i][f][n][u][l][l].*
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Macros must have a populated description.
Parameters: min_description_length (int | None): Minimum length required for the description to be considered populated.
Receives: macro (Macros): The Macros object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the macro path. Macro paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the macro path. Only macro paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_macro_description_populated
yaml # Only "common" macros need to have a populated description manifest_checks: - name: check_macro_description_populated include: ^macros/common
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Macros may not have more than the specified number of lines.
Parameters: max_number_of_lines (int): The maximum number of permitted lines.
Receives: macro (Macros): The Macros object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the macro path. Macro paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the macro path. Only macro paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_macro_max_number_of_lines
yaml manifest_checks: - name: check_macro_max_number_of_lines max_number_of_lines: 100
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Macros names must be the same as the file they are contained in.
Generic tests are also macros, however to document these tests the "name" value must be preceded with "test_".
Receives: macro (Macros): The Macros object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the macro path. Macro paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the macro path. Only macro paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_macro_name_matches_file_name
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Macro properties files must follow the guidance provided by dbt here.
Receives: macro (Macros): The Macros object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the macro path. Macro paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the macro path. Only macro paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_macro_property_file_location
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models must have the specified access attribute. Requires dbt 1.7+.
Parameters: access (Literal["private", "protected", "public"]): The access level to check for.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: # Align with dbt best practices that marts should be `public`, everything else should be `protected` - name: check_model_access access: protected include: ^models/intermediate - name: check_model_access access: public include: ^models/marts - name: check_model_access access: protected include: ^models/staging
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
The raw code for a model must not match the specified regexp pattern.
Parameters: regexp_pattern (str): The regexp pattern that should not be matched by the model code.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: # Prefer `coalesce` over `ifnull`: <https://docs.sqlfluff.com/en/stable/rules.html#sqlfluff.rules.sphinx.Rule_CV02> - name: check_model_code_does_not_contain_regexp_pattern regexp_pattern: .*[i][f][n][u][l][l].*
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Columns defined for models must have the specified keys in the meta config.
Parameters: keys (NestedDict): A list (that may contain sub-lists) of required keys.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_columns_have_meta_keys keys: - owner - pii
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Columns matching a regex pattern must have a relationships test, optionally validating the target column and model.
Parameters:
column_name_pattern (str): Regex pattern to match column names that require a relationships test.
target_column_pattern (str | None): Regex pattern the target column (field) of the relationships test must match. If not provided, any target column is accepted.
target_model_pattern (str | None): Regex pattern the target model of the relationships test must match. If not provided, any target model is accepted.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_columns_have_relationship_tests column_name_pattern: "_fk$"
yaml manifest_checks: - name: check_model_columns_have_relationship_tests column_name_pattern: "_fk$" target_column_pattern: "_pk$" target_model_pattern: "^dim_|^fact_"
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Columns defined for models must have a data_type declared.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_columns_have_types include: ^models/marts
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Public models must have contracts enforced.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_contract_enforced_for_public_model
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models must depend on the specified macros.
Parameters:
criteria: (Literal["any", "all", "one"] | None): Whether the model must depend on any, all, or exactly one of the specified macros. Default: any.
required_macros: (list[str]): List of macros the model must depend on. All macros must specify a namespace, e.g. dbt.is_incremental.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_depends_on_macros required_macros: - dbt.is_incremental - name: check_model_depends_on_macros criteria: one required_macros: - my_package.sampler - my_package.sampling
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models cannot reference more than one source.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_depends_on_multiple_sources
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models must have a description that matches the provided pattern.
Parameters: regexp_pattern (str): The regexp pattern that should match the model description.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_description_contains_regex_pattern regexp_pattern: .*pattern_to_match.*
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models must have a populated description.
Parameters: min_description_length (int | None): Minimum length required for the description to be considered populated.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_description_populated
yaml manifest_checks: - name: check_model_description_populated min_description_length: 25 # Setting a stricter requirement for description length
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Only specified sub-directories are permitted.
Parameters: include (str): Regex pattern to the directory to check. permitted_sub_directories (list[str]): List of permitted sub-directories.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_directories include: models permitted_sub_directories: - intermediate - marts - staging
yaml # Restrict sub-directories within `./models/staging` - name: check_model_directories include: ^models/staging permitted_sub_directories: - crm - payments
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Set the minimum percentage of models that have a populated description.
Parameters: min_model_documentation_coverage_pct (float): The minimum percentage of models that must have a populated description.
Receives:
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_documentation_coverage min_model_documentation_coverage_pct: 90
yaml manifest_checks: - name: check_model_documentation_coverage min_description_length: 25 # Setting a stricter requirement for description length
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models must be documented in the same directory where they are defined (i.e. .yml and .sql files are in the same directory).
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_documented_in_same_directory
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models must have a file name that matches the supplied regex.
Parameters:
file_name_pattern (str): Regexp the file name must match. Please account for the .sql extension.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_file_name description: Marts must include the model version in their file name. include: ^models/marts file_name_pattern: .*(v[0-9])\.sql$
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Model can have grant privileges that match the specified pattern.
Parameters: privilege_pattern (str): Regex pattern to match the privilege.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_grant_privilege include: ^models/marts privilege_pattern: ^select
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Model must have the specified grant privilege.
Parameters: privilege (str): The privilege that is required.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_grant_privilege_required include: ^models/marts privilege: select
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
A model must not contain hard-coded table references; use ref() or source() instead.
Scans raw_code for patterns like FROM schema.table or
JOIN catalog.schema.table that are not wrapped in Jinja expressions.
Hard-coded references bypass the dbt DAG, break lineage, and are
environment-specific.
!!! warning
This check is not foolproof and will not catch all hard-coded table
references (e.g. references inside complex Jinja logic or comments).
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_hard_coded_references
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Table and incremental models must have the specified constraint types defined.
Parameters: required_constraint_types (list[Literal["check", "custom", "foreign_key", "not_null", "primary_key", "unique"]]): List of constraint types that must be present on the model.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_has_constraints required_constraint_types: - primary_key include: ^models/marts
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Model must have contracts enforced.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_has_contracts_enforced include: ^models/marts
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models must have an exposure.
Receives:
exposures (list[ExposureNode]): List of ExposureNode objects parsed from manifest.json.
model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_has_exposure description: Ensure all marts are part of an exposure. include: ^models/marts
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
The meta config for models must have the specified keys.
Parameters: keys (NestedDict): A list (that may contain sub-lists) of required keys.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_has_meta_keys keys: - maturity - owner
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Identify if models have no upstream dependencies as this likely indicates hard-coded tables references.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_has_no_upstream_dependencies
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Model may not end with a semi-colon (;).
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_has_semi_colon include: ^models/marts
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models must have the specified tags.
Parameters:
criteria: (Literal["any", "all", "one"] | None): Whether the model must have any, all, or exactly one of the specified tags. Default: any.
tags (list[str]): List of tags to check for.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_has_tags tags: - tag_1 - tag_2
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models must have a test for uniqueness of a column.
Parameters: accepted_uniqueness_tests (list[str] | None): List of tests that are accepted as uniqueness tests.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_has_unique_test include: ^models/marts
yaml manifest_checks: # Example of allowing a custom uniqueness test - name: check_model_has_unique_test accepted_uniqueness_tests: - dbt_expectations.expect_compound_columns_to_be_unique # i.e. tests from packages must include package name - my_custom_uniqueness_test - unique
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
[
"dbt_expectations.expect_compound_columns_to_be_unique",
"dbt_utils.unique_combination_of_columns",
"unique"
]
Models must have more than the specified number of unit tests.
Parameters: min_number_of_unit_tests (int | None): The minimum number of unit tests that a model must have.
Receives:
manifest_obj (ManifestObject): The ManifestObject object parsed from manifest.json.
model (ModelNode): The ModelNode object to check.
unit_tests (list[UnitTests]): List of UnitTests objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
!!! warning
This check is only supported for dbt 1.8.0 and above.
Example(s):
yaml manifest_checks: - name: check_model_has_unit_tests include: ^models/marts
yaml manifest_checks: - name: check_model_has_unit_tests min_number_of_unit_tests: 2
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Check that the latest_version attribute of the model is set.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_latest_version_specified include: ^models/marts
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models cannot have more than the specified number of upstream dependents that are not tables.
Parameters: materializations_to_include (list[str] | None): List of materializations to include in the check. max_chained_views (int | None): The maximum number of upstream dependents that are not tables.
Receives:
model (ModelNode): The ModelNode object to check.
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_max_chained_views
yaml manifest_checks: - name: check_model_max_chained_views materializations_to_include: - ephemeral - my_custom_materialization - view max_chained_views: 5
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
[
"ephemeral",
"view"
]
Models cannot have more than the specified number of downstream models.
Parameters: max_downstream_models (int | None): The maximum number of permitted downstream models.
Receives:
model (ModelNode): The ModelNode object to check.
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_max_fanout max_downstream_models: 2
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models may not have more than the specified number of lines.
Parameters: max_number_of_lines (int): The maximum number of permitted lines.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_max_number_of_lines
yaml manifest_checks: - name: check_model_max_number_of_lines max_number_of_lines: 150
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Limit the number of upstream dependencies a model has.
Parameters: max_upstream_macros (int | None): The maximum number of permitted upstream macros. max_upstream_models (int | None): The maximum number of permitted upstream models. max_upstream_sources (int | None): The maximum number of permitted upstream sources.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_max_upstream_dependencies max_upstream_models: 3
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models must have a name that matches the supplied regex.
Parameters: model_name_pattern (str): Regexp the model name must match.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_names include: ^models/intermediate model_name_pattern: ^int_ - name: check_model_names include: ^models/staging model_name_pattern: ^stg_
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Model can have the specified number of privileges.
Parameters: max_number_of_privileges (int | None): Maximum number of privileges, inclusive. min_number_of_privileges (int | None): Minimum number of privileges, inclusive.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_number_of_grants include: ^models/marts max_number_of_privileges: 1 # Optional min_number_of_privileges: 0 # Optional
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Model properties files must follow the guidance provided by dbt here.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_property_file_location
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Models must have a schema name that matches the supplied regex.
Note that most setups will use schema names in development that are prefixed, for example: * dbt_jdoe_stg_payments * mary_stg_payments
Please account for this if you wish to run dbt-bouncer against locally generated manifests.
Parameters: schema_name_pattern (str): Regexp the schema name must match.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_schema_name include: ^models/intermediate schema_name_pattern: .*intermediate # Accounting for schemas like `dbt_jdoe_intermediate`. - name: check_model_schema_name include: ^models/staging schema_name_pattern: .*stg_.*
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Set the minimum percentage of models that have at least one test.
Parameters: min_model_test_coverage_pct (float): The minimum percentage of models that must have at least one test.
Receives:
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
tests (list[TestNode]): List of TestNode objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_test_coverage min_model_test_coverage_pct: 90
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Check that the version of the model matches the supplied regex pattern.
Parameters: version_pattern (str): Regexp the version must match.
Receives: model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_version_allowed include: ^models/marts version_pattern: >- # Versions must be numeric [0-9]\d* - name: check_model_version_allowed include: ^models/marts version_pattern: ^(stable|latest)$ # Version can be "stable" or "latest", nothing else is permitted
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Check that the version of the model is always specified in downstream nodes.
Receives:
manifest_obj (ManifestObject): The ManifestObject object parsed from manifest.json.
model (ModelNode): The ModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
materialization (Literal["ephemeral", "incremental", "table", "view"] | None): Limit check to models with the specified materialization.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_model_version_pinned_in_ref include: ^models/marts
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Enforce that the name of the dbt project matches a supplied regex. Generally used to enforce that project names conform to something like company_<DOMAIN>.
Parameters: project_name_pattern (str): Regex pattern to match the project name.
Receives: manifest_obj (ManifestObject): The manifest object.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_project_name project_name_pattern: ^awesome_company_
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Each result can take a maximum duration (seconds).
Parameters: max_execution_time_seconds (float): The maximum execution time (seconds) allowed for a node.
Receives: run_result (RunResultEntry): The RunResultEntry object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the resource path. Resource paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the resource path. Only resource paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml run_results_checks: - name: check_run_results_max_execution_time max_execution_time_seconds: 60
yaml run_results_checks: - name: check_run_results_max_execution_time include: ^models/staging # Not a good idea, here for demonstration purposes only max_execution_time_seconds: 10
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Each result can have a maximum number of gigabytes billed.
!!! note
Note that this check only works for the `dbt-bigquery` adapter.
Parameters: max_gigabytes_billed (float): The maximum number of gigabytes billed.
Receives: run_result (RunResultEntry): The RunResultEntry object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the resource path. Resource paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the resource path. Only resource paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Raises:
RuntimeError: If the dbt-bigquery adapter is not used.
Example(s):
yaml run_results_checks: - name: check_run_results_max_gigabytes_billed max_gigabytes_billed: 100 exclude: ^seeds
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Seed columns must have names that match the supplied regex.
Parameters: seed_column_name_pattern (str): Regexp the column name must match.
Receives: seed (SeedNode): The SeedNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the seed path. Seed paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the seed path. Only seed paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_seed_column_names seed_column_name_pattern: ^[a-z_]+$ # Lowercase with underscores only
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
All columns in a seed CSV file should be included in the seed's properties file, i.e. .yml file.
!!! warning
This check is only supported for dbt 1.9.0 and above.
Receives:
catalog_node (CatalogNodeEntry): The CatalogNodeEntry object to check.
manifest_obj (ManifestObject): The ManifestObject object parsed from manifest.json.
seeds (list[SeedNode]): List of SeedNode objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the seed path. Seed paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the seed path. Only seed paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml catalog_checks: - name: check_seed_columns_are_all_documented
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Columns defined for seeds must have a data_type declared.
Receives: seed (SeedNode): The SeedNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the seed path. Seed paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the seed path. Only seed paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_seed_columns_have_types
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Seeds must have a populated description.
Parameters: min_description_length (int | None): Minimum length required for the description to be considered populated.
Receives: seed (SeedNode): The SeedNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the seed path. Seed paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the seed path. Only seed paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_seed_description_populated
yaml manifest_checks: - name: check_seed_description_populated min_description_length: 25 # Setting a stricter requirement for description length
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Seeds must have more than the specified number of unit tests.
Parameters: min_number_of_unit_tests (int | None): The minimum number of unit tests that a seed must have.
Receives:
manifest_obj (ManifestObject): The ManifestObject object parsed from manifest.json.
seed (SeedNode): The SeedNode object to check.
unit_tests (list[UnitTests]): List of UnitTests objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the seed path. Seed paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the seed path. Only seed paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
!!! warning
This check is only supported for dbt 1.8.0 and above.
Example(s):
yaml manifest_checks: - name: check_seed_has_unit_tests include: ^seeds/core
yaml manifest_checks: - name: check_seed_has_unit_tests min_number_of_unit_tests: 2
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Seed must have a name that matches the supplied regex.
Parameters: seed_name_pattern (str): Regexp the seed name must match.
Receives: seed (SeedNode): The SeedNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the seed path. Seed paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the seed path. Only seed paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_seed_names include: ^seeds seed_name_pattern: ^raw_
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Semantic models should be based on public models only.
Receives:
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
semantic_model (SemanticModelNode): The SemanticModelNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the semantic model path (i.e the .yml file where the semantic model is configured). Semantic model paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the semantic model path (i.e the .yml file where the semantic model is configured). Only semantic model paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_semantic_model_based_on_non_public_models
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Severity levels for dbt-bouncer check results.
Snapshots must have a populated description.
Parameters: min_description_length (int | None): Minimum length required for the description to be considered populated.
Receives: snapshot (SnapshotNode): The SnapshotNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the snapshot path. Snapshot paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the snapshot path. Only snapshot paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_snapshot_description_populated
yaml manifest_checks: - name: check_snapshot_description_populated min_description_length: 25 # Setting a stricter requirement for description length
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Snapshots must have the specified tags.
Parameters:
criteria: (Literal["any", "all", "one"] | None): Whether the snapshot must have any, all, or exactly one of the specified tags. Default: all.
tags (list[str]): List of tags to check for.
Receives: snapshot (SnapshotNode): The SnapshotNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the snapshot path. Snapshot paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the snapshot path. Only snapshot paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_snapshot_has_tags tags: - tag_1 - tag_2
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Snapshots must have a name that matches the supplied regex.
Parameters: snapshot_name_pattern (str): Regexp the snapshot name must match.
Receives: snapshot (SnapshotNode): The SnapshotNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the snapshot path. Snapshot paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the snapshot path. Only snapshot paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_snapshot_names include: ^snapshots/erp snapshot_name_pattern: ^erp
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
All columns in a source should be included in the source's properties file, i.e. .yml file.
Receives:
catalog_source (CatalogNodeEntry): The CatalogNodeEntry object to check.
sources (list[SourceNode]): List of SourceNode objects parsed from catalog.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml catalog_checks: - name: check_source_columns_are_all_documented
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Sources must have a populated description.
Parameters: min_description_length (int | None): Minimum length required for the description to be considered populated.
Receives: source (SourceNode): The SourceNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_source_description_populated
yaml manifest_checks: - name: check_source_description_populated min_description_length: 25 # Setting a stricter requirement for description length
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Sources must have a populated freshness.
Receives: source (SourceNode): The SourceNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_source_freshness_populated
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
The meta config for sources must have the specified keys.
Parameters: keys (NestedDict): A list (that may contain sub-lists) of required keys.
Receives: source (SourceNode): The SourceNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_source_has_meta_keys keys: - contact: - email - slack - owner
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Sources must have the specified tags.
Parameters:
criteria: (Literal["any", "all", "one"] | None): Whether the source must have any, all, or exactly one of the specified tags. Default: all.
tags (list[str]): List of tags to check for.
Receives: source (SourceNode): The SourceNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_source_has_tags tags: - tag_1 - tag_2
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Sources must have a populated loader.
Receives: source (SourceNode): The SourceNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_source_loader_populated
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Sources must have a name that matches the supplied regex.
Parameters: source_name_pattern (str): Regexp the source name must match.
Receives: source (SourceNode): The SourceNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_source_names source_name_pattern: > ^[a-z0-9_]*$
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Sources must be referenced in at least one model.
Receives:
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
source (SourceNode): The SourceNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_source_not_orphaned
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Source properties files must follow the guidance provided by dbt here.
Receives: source (SourceNode): The SourceNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_source_property_file_location
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Sources can only be referenced by models that are located in the same directory where the source is defined.
Receives: source (SourceNode): The SourceNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_source_used_by_models_in_same_directory
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Each source can be referenced by a maximum of one model.
Receives:
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
source (SourceNode): The SourceNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_source_used_by_only_one_model
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
The meta config for data tests must have the specified keys.
Parameters: keys (NestedDict): A list (that may contain sub-lists) of required keys.
Receives: test (TestNode): The TestNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the test path. Test paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the test path. Only test paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_test_has_meta_keys keys: - owner
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Data tests must have the specified tags.
Parameters:
criteria (Literal["any", "all", "one"] | None): Whether the test must have any, all, or exactly one of the specified tags. Default: all.
tags (list[str]): List of tags to check for.
Receives: test (TestNode): The TestNode object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the test path. Test paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the test path. Only test paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_test_has_tags tags: - critical
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Set the minimum percentage of models that have a unit test.
!!! warning
This check is only supported for dbt 1.8.0 and above.
Parameters: min_unit_test_coverage_pct (float): The minimum percentage of models that must have a unit test.
Receives:
models (list[ModelNode]): List of ModelNode objects parsed from manifest.json.
unit_tests (list[UnitTests]): List of UnitTests objects parsed from manifest.json.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
include (str | None): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_unit_test_coverage min_unit_test_coverage_pct: 90
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
Unit tests can only use the specified formats.
!!! warning
This check is only supported for dbt 1.8.0 and above.
Parameters:
permitted_formats (list[Literal["csv", "dict", "sql"]] | None): A list of formats that are allowed to be used for expect input in a unit test.
Receives:
manifest_obj (ManifestObject): The ManifestObject object parsed from manifest.json.
unit_test (UnitTests): The UnitTests object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the unit test path (i.e the .yml file where the unit test is configured). Unit test paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the unit test path (i.e the .yml file where the unit test is configured). Only unit test paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_unit_test_expect_format permitted_formats: - csv
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
[
"csv",
"dict",
"sql"
]
Unit tests can only use the specified formats.
!!! warning
This check is only supported for dbt 1.8.0 and above.
Parameters:
permitted_formats (list[Literal["csv", "dict", "sql"]] | None): A list of formats that are allowed to be used for expect input in a unit test.
Receives:
manifest_obj (ManifestObject): The ManifestObject object parsed from manifest.json.
unit_test (UnitTests): The UnitTests object to check.
Other Parameters:
description (str | None): Description of what the check does and why it is implemented.
exclude (str | None): Regex pattern to match the unit test path (i.e the .yml file where the unit test is configured). Unit test paths that match the pattern will not be checked.
include (str | None): Regex pattern to match the unit test path (i.e the .yml file where the unit test is configured). Only unit test paths that match the pattern will be checked.
severity (Literal["error", "warn"] | None): Severity level of the check. Default: error.
Example(s):
yaml manifest_checks: - name: check_unit_test_given_formats permitted_formats: - csv
Description of what the check does and why it is implemented.
Regexp to match which paths to exclude.
Regexp to match which paths to include.
Limit check to models with the specified materialization.
Severity of the check, one of 'error' or 'warn'.
[
"csv",
"dict",
"sql"
]
dbt materialization strategies.