Last updated
Was this helpful?
Last updated
Was this helpful?
check-macro-has-description
Arguments
--manifest
: location of manifest.json
file. Usually target/manifest.json
. This file contains a full representation of dbt project. Default: target/manifest.json
--exclude
: Regex pattern to exclude files.
Example
Requirements
1 It means that you need to run dbt parse
before run this hook (dbt >= 1.5).
2 It means that you need to run dbt docs generate
before run this hook.
How it works
Hook takes all changed yml
and SQL
files.
The macro name is obtained from the SQL
file name.
The manifest is scanned for a macro.
Modified yml
files are scanned for a macro.
If any macro (from a manifest or yml
files) does not have a description, the hook fails.
The macro description must be in either the yml file or the manifest.
Known limitations
If you run
and then you delete the description from a properties file, the hook success since the description is still present in manifest.json
.
check-macro-arguments-have-desc
Arguments
--manifest
: location of manifest.json
file. Usually target/manifest.json
. This file contains a full representation of dbt project. Default: target/manifest.json
Example
Requirements
1 It means that you need to run dbt parse
before run this hook (dbt >= 1.5).
2 It means that you need to run dbt docs generate
before run this hook.
How it works
Hook takes all changed yml
and SQL
files.
The macro name is obtained from the SQL
file name.
The manifest is scanned for a macro.
Modified yml
files are scanned for a macro.
If any argument in the found macro does not contain a description, the hook fails.
The description must be in either the yml file or the manifest.
Known limitations
If you run
and then you delete argument description from a properties file, the hook success since the description is still present in manifest.json
.
Macro exists in manifest.json
1
Macro exists in catalog.json
2
❌ Not needed since it also validates properties files
❌ Not needed
Macro exists in manifest.json
1
Macro exists in catalog.json
2
❌ Not needed since it also validates properties files
❌ Not needed