Tests#
Note
The below checks require catalog.json to be present.
Checks related to column tests.
Functions:
| Name | Description |
|---|---|
check_column_has_specified_test |
Columns that match the specified regexp pattern must have a specified test. |
check_column_has_specified_test
#
Columns that match the specified regexp pattern must have a specified test.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
column_name_pattern
|
str
|
Regex pattern to match the column name. |
required |
test_name
|
str
|
Name of the test to check for. |
required |
Receives at execution time:
| Name | Type | Description |
|---|---|---|
catalog_node |
CatalogNodeEntry
|
The CatalogNodeEntry 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 | 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: |
Example(s):
catalog_checks:
- name: check_column_has_specified_test
column_name_pattern: ^is_.*
test_name: not_null