Manifest Checks: Sources#
Note
The below checks require manifest.json
to be present.
Classes:
Name | Description |
---|---|
CheckSourceDescriptionPopulated |
Sources must have a populated description. |
CheckSourceFreshnessPopulated |
Sources must have a populated freshness. |
CheckSourceHasMetaKeys |
The |
CheckSourceHasTags |
Sources must have the specified tags. |
CheckSourceLoaderPopulated |
Sources must have a populated loader. |
CheckSourceNames |
Sources must have a name that matches the supplied regex. |
CheckSourceNotOrphaned |
Sources must be referenced in at least one model. |
CheckSourcePropertyFileLocation |
Source properties files must follow the guidance provided by dbt here. |
CheckSourceUsedByModelsInSameDirectory |
Sources can only be referenced by models that are located in the same directory where the source is defined. |
CheckSourceUsedByOnlyOneModel |
Each source can be referenced by a maximum of one model. |
CheckSourceDescriptionPopulated
#
Sources must have a populated description.
Receives at execution time:
Name | Type | Description |
---|---|---|
source |
DbtBouncerSourceBase
|
The DbtBouncerSourceBase object to check. |
Other Parameters (passed via config file):
Name | Type | Description |
---|---|---|
exclude |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked. |
include |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked. |
severity |
Optional[Literal['error', 'warn']]
|
Severity level of the check. Default: |
Example(s):
Source code in src/dbt_bouncer/checks/manifest/check_sources.py
CheckSourceFreshnessPopulated
#
Sources must have a populated freshness.
Receives at execution time:
Name | Type | Description |
---|---|---|
source |
DbtBouncerSource
|
The DbtBouncerSourceBase object to check. |
Other Parameters (passed via config file):
Name | Type | Description |
---|---|---|
exclude |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked. |
include |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked. |
severity |
Optional[Literal['error', 'warn']]
|
Severity level of the check. Default: |
Example(s):
Source code in src/dbt_bouncer/checks/manifest/check_sources.py
CheckSourceHasMetaKeys
#
The meta
config for sources must have the specified keys.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
keys
|
NestedDict
|
A list (that may contain sub-lists) of required keys. |
required |
Receives at execution time:
Name | Type | Description |
---|---|---|
source |
DbtBouncerSource
|
The DbtBouncerSourceBase object to check. |
Other Parameters (passed via config file):
Name | Type | Description |
---|---|---|
exclude |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked. |
include |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked. |
severity |
Optional[Literal['error', 'warn']]
|
Severity level of the check. Default: |
Example(s):
Source code in src/dbt_bouncer/checks/manifest/check_sources.py
CheckSourceHasTags
#
Sources must have the specified tags.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source
|
DbtBouncerSource
|
The DbtBouncerSourceBase object to check. |
required |
tags
|
List[str]
|
List of tags to check for. |
required |
Other Parameters (passed via config file):
Name | Type | Description |
---|---|---|
exclude |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked. |
include |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked. |
severity |
Optional[Literal['error', 'warn']]
|
Severity level of the check. Default: |
Example(s):
Source code in src/dbt_bouncer/checks/manifest/check_sources.py
CheckSourceLoaderPopulated
#
Sources must have a populated loader.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source
|
DbtBouncerSource
|
The DbtBouncerSourceBase object to check. |
required |
Other Parameters (passed via config file):
Name | Type | Description |
---|---|---|
exclude |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked. |
include |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked. |
severity |
Optional[Literal['error', 'warn']]
|
Severity level of the check. Default: |
Example(s):
Source code in src/dbt_bouncer/checks/manifest/check_sources.py
CheckSourceNames
#
Sources must have a name that matches the supplied regex.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source_name_pattern
|
str
|
Regexp the source name must match. |
required |
Receives at execution time:
Name | Type | Description |
---|---|---|
source |
DbtBouncerSource
|
The DbtBouncerSourceBase object to check. |
Other Parameters (passed via config file):
Name | Type | Description |
---|---|---|
exclude |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked. |
include |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked. |
severity |
Optional[Literal['error', 'warn']]
|
Severity level of the check. Default: |
Example(s):
Source code in src/dbt_bouncer/checks/manifest/check_sources.py
CheckSourceNotOrphaned
#
Sources must be referenced in at least one model.
Receives at execution time:
Name | Type | Description |
---|---|---|
models |
List[DbtBouncerModelBase]
|
List of DbtBouncerModelBase objects parsed from |
source |
DbtBouncerSource
|
The DbtBouncerSourceBase object to check. |
Other Parameters (passed via config file):
Name | Type | Description |
---|---|---|
exclude |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked. |
include |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked. |
severity |
Optional[Literal['error', 'warn']]
|
Severity level of the check. Default: |
Example(s):
Source code in src/dbt_bouncer/checks/manifest/check_sources.py
CheckSourcePropertyFileLocation
#
Source properties files must follow the guidance provided by dbt here.
Receives at execution time:
Name | Type | Description |
---|---|---|
source |
DbtBouncerSource
|
The DbtBouncerSourceBase object to check. |
Other Parameters (passed via config file):
Name | Type | Description |
---|---|---|
exclude |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked. |
include |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked. |
severity |
Optional[Literal['error', 'warn']]
|
Severity level of the check. Default: |
Example(s):
Source code in src/dbt_bouncer/checks/manifest/check_sources.py
CheckSourceUsedByModelsInSameDirectory
#
Sources can only be referenced by models that are located in the same directory where the source is defined.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
models
|
List[DbtBouncerModelBase]
|
List of DbtBouncerModelBase objects parsed from |
required |
source
|
DbtBouncerSource
|
The DbtBouncerSourceBase object to check. |
required |
Other Parameters (passed via config file):
Name | Type | Description |
---|---|---|
exclude |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked. |
include |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked. |
severity |
Optional[Literal['error', 'warn']]
|
Severity level of the check. Default: |
Example(s):
Source code in src/dbt_bouncer/checks/manifest/check_sources.py
CheckSourceUsedByOnlyOneModel
#
Each source can be referenced by a maximum of one model.
Receives at execution time:
Name | Type | Description |
---|---|---|
models |
List[DbtBouncerModelBase]
|
List of DbtBouncerModelBase objects parsed from |
source |
DbtBouncerSource
|
The DbtBouncerSourceBase object to check. |
Other Parameters (passed via config file):
Name | Type | Description |
---|---|---|
exclude |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Source paths that match the pattern will not be checked. |
include |
Optional[str]
|
Regex pattern to match the source path (i.e the .yml file where the source is configured). Only source paths that match the pattern will be checked. |
severity |
Optional[Literal['error', 'warn']]
|
Severity level of the check. Default: |
Example(s):