Skip to content

Commit

Permalink
Add rule: model should have an owner (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieucan authored May 21, 2024
1 parent 4afbe50 commit c7812e7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/dbt_score/rules/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ def columns_have_description(model: Model) -> RuleViolation | None:
message=f"The following columns lack a description: "
f"{', '.join(invalid_column_names)}."
)


@rule
def has_owner(model: Model) -> RuleViolation | None:
"""A model should have an owner."""
if not model.meta.get("owner"):
return RuleViolation(message="Model lacks an owner.")

0 comments on commit c7812e7

Please sign in to comment.