slidoapp / dbt-coverage

One-stop-shop for docs and test coverage of dbt projects.
MIT License
191 stars 26 forks source link

Add tag filtering option for dbt-coverage users #75

Closed chrishronek closed 6 months ago

chrishronek commented 6 months ago

Not sure if you're taking oss contributions. I saw that you had path filtering, but this would allow users to filter their reports to a specific tag which would fit our use case for dbt-coverage. Great project, btw!

Usage:

dbt-coverage compute doc --cov-report coverage-test.json --model-tag-filter tag:<put-your-dbt-tag-here>

sweco commented 6 months ago

Hey @chrishronek, thanks for your PR, we're definitely accepting contributions. 😊

Thinking about the added functionality, wouldn't it be sufficient to simply run the dbt docs generate only for the selected tag, i.e. dbt docs generate --select tag:<tag>? I'm just thinking whether it's a good idea to replicate functionality from dbt. We already did this once - https://github.com/slidoapp/dbt-coverage/pull/45 - but I think it's mostly only more code to maintain without much added value.

chrishronek commented 6 months ago

Hey @chrishronek, thanks for your PR, we're definitely accepting contributions. 😊

Thinking about the added functionality, wouldn't it be sufficient to simply run the dbt docs generate only for the selected tag, i.e. dbt docs generate --select tag:<tag>? I'm just thinking whether it's a good idea to replicate functionality from dbt. We already did this once - #45 - but I think it's mostly only more code to maintain without much added value.

Frankly, I'm a little embarrassed that I didn't think of that myself 😅. I'm going to go ahead and close. Thanks for the response!

sweco commented 6 months ago

No worries at all! 😊