Description#
Note
The below checks require manifest.json to be present.
Checks related to model descriptions and documentation coverage.
Functions:
| Name | Description |
|---|---|
check_model_description_contains_regex_pattern |
Models must have a description that matches the provided pattern. |
check_model_description_populated |
Models must have a populated description. |
check_model_documentation_coverage |
Set the minimum percentage of models that have a populated description. |
check_model_documented_in_same_directory |
Models must be documented in the same directory where they are defined (i.e. |
check_model_description_contains_regex_pattern
#
Models must have a description that matches the provided pattern.
Receives at execution time:
| Name | Type | Description |
|---|---|---|
model |
ModelNode
|
The ModelNode object to check. |
regexp_pattern |
str
|
The regexp pattern that should match the model description. |
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. |
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: |
Example(s):
manifest_checks:
- name: check_model_description_contains_regex_pattern
- regex_pattern: .*pattern_to_match.*
Source code in src/dbt_bouncer/checks/manifest/models/description.py
check_model_description_populated
#
Models must have a populated description.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
min_description_length
|
int | None
|
Minimum length required for the description to be considered populated. |
None
|
Receives at execution time:
| Name | Type | Description |
|---|---|---|
model |
ModelNode
|
The ModelNode 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 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: |
Example(s):
manifest_checks:
- name: check_model_description_populated
min_description_length: 25 # Setting a stricter requirement for description length
Source code in src/dbt_bouncer/checks/manifest/models/description.py
check_model_documentation_coverage
#
Set the minimum percentage of models that have a populated description.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
min_model_documentation_coverage_pct
|
float
|
The minimum percentage of models that must have a populated description. |
100
|
Receives at execution time:
| Name | Type | Description |
|---|---|---|
models |
list[ModelNode]
|
List of ModelNode 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. |
severity |
Literal[error, warn] | None
|
Severity level of the check. Default: |
Example(s):
manifest_checks:
- name: check_model_documentation_coverage
min_model_documentation_coverage_pct: 90
manifest_checks:
- name: check_model_documentation_coverage
min_description_length: 25 # Setting a stricter requirement for description length
Source code in src/dbt_bouncer/checks/manifest/models/description.py
check_model_documented_in_same_directory
#
Models must be documented in the same directory where they are defined (i.e. .yml and .sql files are in the same directory).
Receives at execution time:
| Name | Type | Description |
|---|---|---|
model |
ModelNode
|
The ModelNode 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 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: |
Example(s):