Skip to content

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

@verhey

Description

@verhey

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions