dbt-coverage
dbt-coverage copied to clipboard
Add model-level coverage reporting in addition to existing column-level coverage
This is more of a feature request, but it'd be neat to have coverage options less strict than the existing column-level ones. I understand this request might go against the original ethos of the project - but hear me out 😅
For context, we have a large dbt project that makes use of base models. We also have some wide sources/base models (500+ columns) that it's just not all that cost-effective to add testing to every column of. They negatively affect our column-level coverage reporting by quite a bit.
Similar to https://github.com/tnightengale/dbt-meta-testing one of the things we're trying to do going forward is require every model have tests and docs on core columns, but not necessarily tests and docs on every column - as to me that feels excessive. I know we could just use dbt-meta-testing for this but I like how this is a) a python package instead of a dbt one, and b) doesn't require any modification of our dbt_project.yml - just definition of a CI job.
I've written a quick script for us (gist source) to parse the coverage.json generated by dbt-coverage to model or folder-level coverage, but have you considered adding that slightly higher level of coverage reporting to the package? I understand it's not as correct as column-level checks, but for our particular use-case it'd definitely have some utility.
Happy to try and toss in a PR, but wanted to make sure this is actually something you thought was a good idea before doing so - I don't necessarily have the context of the project.
Hey @verhey, I am pretty sure we'd be happy to take a look at a PR, if you'd be still willing to put one together 🙂
One other thing to note would be that it seems having a "coverage ignorelist" -- something like .gitignore, just for dbt-coverage might be of some help in your usecase as well. Would you agree?