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

Optionally allow extra keys in check-model-has-meta-keys #65

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

fernandobrito
Copy link
Contributor

Today check-model-has-meta-keys does not allow the model to have any other meta keys other than the ones required.

This PR introduces an optional argument to allow for it.
Our use case is that we need a check that checks that all models have, at a minimum, an "owner" meta key, while still allowing other meta keys (PII, etc).

The extra parameter has a False default value, meaning it is backward compatible with everyone that is using the check today.

More context on: #60

@codecov-commenter
Copy link

codecov-commenter commented Apr 29, 2022

Codecov Report

Merging #65 (584fc80) into main (cc144b9) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #65   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           45        45           
  Lines         1956      1964    +8     
  Branches       258       259    +1     
=========================================
+ Hits          1956      1964    +8     
Impacted Files Coverage Δ
pre_commit_dbt/check_model_has_meta_keys.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc144b9...584fc80. Read the comment docs.

@ssassi
Copy link
Collaborator

ssassi commented Oct 3, 2022

I think this is a nice feature. If you @BAntonellini fix conflicts and test this I'll merge it.

@ssassi ssassi merged commit 584fc80 into dbt-checkpoint:main Oct 5, 2022
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

Successfully merging this pull request may close these issues.

None yet

4 participants