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

Improve validations for derived metrics #279

Merged
merged 4 commits into from
May 24, 2024

Conversation

courtneyholcomb
Copy link
Contributor

@courtneyholcomb courtneyholcomb commented May 24, 2024

Resolves #270

Description

Improve validations for derived metrics.

  • If there were no input metrics set, previously users would run into an AssertionError that interrupts the semantic manifest validation process. This changes that to be a more user-friendly validation error.
  • Add a validation to ensure that expr is set and that it references all the input metrics.

Checklist

@courtneyholcomb courtneyholcomb requested review from QMalcolm, graciegoheen and a team as code owners May 24, 2024 16:24
@cla-bot cla-bot bot added the cla:yes label May 24, 2024
Copy link
Contributor

@DevonFulcher DevonFulcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@courtneyholcomb courtneyholcomb merged commit 4127671 into main May 24, 2024
22 checks passed
@courtneyholcomb courtneyholcomb deleted the court/validate-derived-metrics branch May 24, 2024 16:50
courtneyholcomb added a commit that referenced this pull request Jun 5, 2024
courtneyholcomb added a commit that referenced this pull request Jun 5, 2024
Reverts #279

With the onset of dbt-mantle, we can no longer add new validations that
might cause errors for existing manifests, or customers might see jobs
abruptly failing. Instead, we need to figure out a new process for
rolling out validations - likely adding warnings to start.
courtneyholcomb added a commit that referenced this pull request Jun 16, 2024
Improve validations for derived metrics.
- If there were no input metrics set, previously users would run into an
`AssertionError` that interrupts the semantic manifest validation
process. This changes that to be a more user-friendly validation error.
- Add a validation to ensure that `expr` is set and that it references
all the input metrics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Make expr required for derived metrics
4 participants