Tests#
Note
The below checks require manifest.json to be present.
Checks related to source test coverage.
Functions:
| Name | Description |
|---|---|
check_source_has_tests |
Sources must have a minimum number of tests. |
check_source_has_tests
#
Sources must have a minimum number of tests.
Rationale
Untested sources are a reliability risk: schema drift or data-quality issues in raw tables can propagate silently through your entire project. Requiring at least one test per source ensures that freshness, uniqueness, or accepted-values constraints are verified before data enters the transformation layer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
min_number_of_tests
|
int
|
The minimum number of tests a source must have. Default: 1. |
1
|
Receives at execution time:
| Name | Type | Description |
|---|---|---|
source |
SourceNode
|
The SourceNode object to check. |
tests |
list[TestNode]
|
List of TestNode objects parsed from |
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 | list[str] | None
|
Regex pattern(s) to match the source path (i.e the .yml file where the source is configured). Source paths that match any pattern will not be checked. |
include |
str | list[str] | None
|
Regex pattern(s) to match the source path (i.e the .yml file where the source is configured). Only source paths that match any pattern will be checked. |
severity |
Literal[error, warn] | None
|
Severity level of the check. Default: |
Example(s):