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.
Rationale
A free-text description field is easy to fill with placeholder or low-quality content. Requiring descriptions to match a pattern (e.g. a minimum sentence structure or a specific prefix) ensures that documentation meets a baseline standard of usefulness rather than just being non-empty.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
regexp_pattern
|
str
|
The regexp pattern that should match the model description. |
required |
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_contains_regex_pattern
regexp_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.
Rationale
Descriptions are the primary way data consumers discover what a model represents and how to use it. Without them, analysts waste time reverse-engineering SQL logic or asking the data team. This check ensures every model is self-documenting, which is critical for onboarding, data catalogues, and self-service analytics.
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.
Rationale
Rather than requiring every single model to be documented immediately, this check allows teams to set a realistic target and enforce it incrementally. It prevents documentation coverage from silently regressing as new models are added, nudging teams towards full documentation over time.
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).
Rationale
Co-locating a model's SQL file and its YAML documentation makes the project easier to navigate. When documentation lives in a different directory, contributors may miss it during code review or forget to update it when changing the model. Keeping both files together reinforces the habit of treating documentation as part of the model definition.
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):