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

Add per-measure validation in query validation rules #1480

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

plypaul
Copy link
Contributor

@plypaul plypaul commented Oct 28, 2024

This PR updates the signature of the PostResolutionQueryValidationRule to allow for query validation on a per-measure basis. This allows for simpler validation for checks that depend on a measure as used in a later PR.

@cla-bot cla-bot bot added the cla:yes label Oct 28, 2024
@plypaul plypaul marked this pull request as ready for review October 28, 2024 17:10
@@ -65,7 +65,18 @@ def _default_handler(self, node: GroupByItemResolutionNode) -> MetricFlowQueryRe

@override
def visit_measure_node(self, node: MeasureGroupByItemSourceNode) -> MetricFlowQueryResolutionIssueSet:
return self._default_handler(node)
with self._path_from_start_node_tracker.track_node_visit(node) as current_traversal_path:
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious: what is this track_node_visit for? Just for our own debugging?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's both for debugging and providing context to validation error messages.

Base automatically changed from p--short-term-perf--26 to p--short-term-perf--25 October 29, 2024 22:55
Base automatically changed from p--short-term-perf--25 to main October 29, 2024 22:59
@plypaul plypaul merged commit c8f85de into main Oct 29, 2024
15 checks passed
@plypaul plypaul deleted the p--short-term-perf--27 branch October 29, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants