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 SemanticManifestValidator rule for checking WhereFilter.call_parameter_sets of Metric filters #120

Closed
QMalcolm opened this issue Jul 20, 2023 · 0 comments · Fixed by #131
Labels
good first issue Good for newcomers Validations Changes to Validation Rules

Comments

@QMalcolm
Copy link
Collaborator

QMalcolm commented Jul 20, 2023

Context

Metrics can have many WhereFilters associated with them. Specifically:

  • Metric.filter
  • Metric.type_params.measure.filter
  • Metric.type_params.denominator.filter
  • Metric.type_params.numerator.filter
  • Metric.type_params.input_metrics[x].filter
    That's quite a few filters. Additionally the where_sql_template of a WhereFilter is a highly structured. Technically with Add call_parameter_sets to the WhereFilter Protocol #110 call_parameter_sets guarantees the structure of a WhereFilters where_sql_template, but this only happens if call_parameter_sets is actually called. The best way to pseudo guarantee this happens is to add a SemanticManifestValidationRule to the default rules of the SemanticManifestValidator. It's only a pseudo guarantee because from DSI's perspective, it's not guaranteed that a SemanticManifest has been run through the SemanticManifestValidator, however that is best practice and what people should do.

Acceptance Criteria

THERE EXISTS a SemanticManifestValidationRule
THAT checks call_parameter_sets of all filters of all metrics on a SemanticManifest
AND the new rule is added to the default rules of the SemanticManifestValidator

@QMalcolm QMalcolm added good first issue Good for newcomers Validations Changes to Validation Rules labels Jul 20, 2023
@QMalcolm QMalcolm changed the title Add SemanticManifestValidator rule for checking WhereFilter.call_parameter_sets of Metric filters Add SemanticManifestValidator rule for checking WhereFilter.call_parameter_sets of Metric filters Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Validations Changes to Validation Rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant