-
Notifications
You must be signed in to change notification settings - Fork 98
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
Updated error message for validation tasks #1338
Conversation
@@ -238,7 +238,7 @@ def gen_dimension_tasks( | |||
), | |||
element_type=SemanticModelElementType.DIMENSION, | |||
), | |||
error_message=f"Unable to query dimension `{spec.element_name}` on semantic model `{semantic_model.name}` in data warehouse", | |||
error_message=f"Unable to query dimension `{spec.qualified_name}` on semantic model `{semantic_model.name}` in data warehouse", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: This was logic already here, but do we need to query against every grain for a time dimension? Could we just consolidate this to only query for the time dimension column or are there cases where the grain/dow casting fails. This all feels redundant if that's not the case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmmm cases I can think of:
- the grain is too small for what the time dimension supports
- date part is not supported for cumulative metrics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So since these arent metric queries and just straight SELECT <dim column> FROM sem_model
do those still apply?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user can request a grain then the grain one still applies! Like is there a date trunc happening here? If so it could fail if the time column can't be trunced to a certain level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually same for date part since they could request a date part that's too small for the column
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea the date trunc happens here
Context
Currently, in dwh validations for dimensions, we query all the dimensions in 1 query and if that fails we attempt to query each dimension one by one. However, with time dimension, we end up querying multiple variants of a singular dimension (ie.,
ordered_at
expands to queryingordered_at__week
,ordered_at__month
, etc...), but the error message only used the element_ment. This meant in the error, we ended up seeing "duplicates", but it was actually just querying each one of those variants. With this, we should use the qualfiied name to see what we're actually querying forExample: