Manifest Checks: Tests#
Note
The below checks require manifest.json to be present.
Functions:
| Name | Description |
|---|---|
check_test_has_meta_keys |
The |
check_test_has_tags |
Data tests must have the specified tags. |
check_test_has_meta_keys
#
The meta config for data tests must have the specified keys.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
keys
|
NestedDict
|
A list (that may contain sub-lists) of required keys. |
required |
test
|
TestNode
|
The TestNode object to check. |
required |
Other Parameters (passed via config file):
| Name | Type | Description |
|---|---|---|
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: |
Example(s):
Source code in src/dbt_bouncer/checks/manifest/check_tests.py
check_test_has_tags
#
Data tests must have the specified tags.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
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. |
required |
Receives at execution time:
| Name | Type | Description |
|---|---|---|
test |
TestNode
|
The TestNode object to check. |
Other Parameters (passed via config file):
| Name | Type | Description |
|---|---|---|
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: |
Example(s):