Support Enforcement of Descriptions and Tests as a Config Option #5094
Replies: 2 comments 2 replies
-
Hmmm. Interesting idea! Thanks for writing up this detailed proposal, @tnightengale. I'd be really curious to hear what other community members think. Here are my two cents:
my_project:
+require_descriptions: "{{ 'true' if target.name != 'dev' else 'false' }}"
I think this feels hackier today than it really is, or ultimately should be. We're stabilizing and documenting the schema of the manifest in dbt v0.19.0. I would love nothing more than for these scripts to be open sourced and widely tested. I believe that such a check could even be written as a Jinja macro. In that case it could be (a) executed as a run-operation within a CI job definition, and (b) open sourced as a dbt package, and pinned to supported dbt versions. |
Beta Was this translation helpful? Give feedback.
-
This exists already via this option |
Beta Was this translation helpful? Give feedback.
-
Describe the feature
Would anyone be interested in config settings, that could enforce documentation and tests for models? Eg.
and models in the resource path with empty descriptions or without the required tests will result in a failed run/compilation?
Currently we implement these approaches with custom scripts in our CI that parse the manifest.json. I think it would be wonderful if these became builtin options for others to use easily.
Describe alternatives you've considered
Basically parsing the manifest with a python script in the CI. This is sort of a hack.
Who will this benefit?
Adding this optionality in reduces the onus on reviewers to call out missing docs/tests. This helps teams who want to really automate their deployments of dbt. Ideally to the point that something is in the prod database/schema etc as soon as it is merged.
Allowing the option to enforce tests/docs along model paths reduces unnecessary dialogue on PRs: if the CI passes, and these options are enabled, then the submitter has already done their diligence.
Are you interested in contributing this feature?
I am interested in working on this, and am creating this ticket to get feedback and track work on it.
Beta Was this translation helpful? Give feedback.
All reactions