Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add model-level coverage reporting in addition to existing column-level coverage #28

Open
verhey opened this issue Apr 2, 2022 · 3 comments

Comments

@verhey
Copy link

verhey commented Apr 2, 2022

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.

@mrshu
Copy link
Contributor

mrshu commented Jul 30, 2022

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 🙂

@mrshu
Copy link
Contributor

mrshu commented Jul 30, 2022

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?

@calbutl
Copy link

calbutl commented Oct 29, 2024

Just chiming in as this issue is a bit stale.
Both of the features proposed here would be amazing:

  1. model-level coverage reporting
  2. a coverage ignorlist akin to .gitignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants