dbt-coverage
dbt-coverage copied to clipboard
Create a new `check` command
Great work on this package; I tried building something similar earlier but will go with this package instead.
The command I want to add is check, which checks that all columns referenced in YAML are present in the table.
Would this be something you'd be interested in adding to this package? If so, happy to contribute a PR.
Hey @k-aranke! Thank you for the interest in the project 😊 and sorry for only replying now.
This type of check is definitely useful, I'm just wondering whether the coverage package should also measure the over-coverage. As the simplest form of implementing this, I could imagine logging a warning about such fields but I guess this is not very helpful when wanting to run this check in places where a machine needs decide whether there are no such columns (e.g. CI).
Where did you have in mind that you would use this kind of information?
A friendly ping @aranke -- would you happen to be able to provide a bit more background?
Sure, this would be really useful in CI checks to catch typos in YAML.
Thanks @aranke!
I think we'd be happy to take a look at a PR if you'd be up for putting one together 🙂
@aranke if you are looking for a quick fix, with a different sort of an approach, maybe the dbt-meta-testing package might be of some help: https://hub.getdbt.com/tnightengale/dbt_meta_testing/latest/