Manifest Checks: Lineage#
Note
The below checks require manifest.json to be present.
Functions:
| Name | Description |
|---|---|
check_lineage_permitted_upstream_models |
Upstream models must have a path that matches the provided |
check_lineage_seed_cannot_be_used |
Seed cannot be referenced in models with a path that matches the specified |
check_lineage_source_cannot_be_used |
Sources cannot be referenced in models with a path that matches the specified |
check_lineage_permitted_upstream_models
#
Upstream models must have a path that matches the provided upstream_path_pattern.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
upstream_path_pattern
|
str
|
Regexp pattern to match the upstream model(s) path. |
required |
Receives at execution time:
| Name | Type | Description |
|---|---|---|
manifest_obj |
ManifestObject
|
The manifest object. |
model |
ModelNode
|
The ModelNode object to check. |
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. |
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):
manifest_checks:
- name: check_lineage_permitted_upstream_models
include: ^models/staging
upstream_path_pattern: $^
- name: check_lineage_permitted_upstream_models
include: ^models/intermediate
upstream_path_pattern: ^models/staging|^models/intermediate
- name: check_lineage_permitted_upstream_models
include: ^models/marts
upstream_path_pattern: ^models/staging|^models/intermediate
Source code in src/dbt_bouncer/checks/manifest/check_lineage.py
check_lineage_seed_cannot_be_used
#
Seed cannot be referenced in models with a path that matches the specified include config.
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. |
severity |
Literal[error, warn] | None
|
Severity level of the check. Default: |
Example(s):
manifest_checks:
- name: check_lineage_seed_cannot_be_used
include: ^models/intermediate|^models/marts
Source code in src/dbt_bouncer/checks/manifest/check_lineage.py
check_lineage_source_cannot_be_used
#
Sources cannot be referenced in models with a path that matches the specified include config.
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. |
severity |
Literal[error, warn] | None
|
Severity level of the check. Default: |
Example(s):
manifest_checks:
- name: check_lineage_source_cannot_be_used
include: ^models/intermediate|^models/marts