-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: Operator dash user counts, performance #839
Conversation
Don't use the user_pii table for user counts, since it may not be populated. Change this chart to be a count of active enrollments, which people have said is more useful. Also changed the time range for operator dash to 90 days to improve performance of the actors / events graphs.
17a05e8
to
0cc17dc
Compare
-- Need to cast the course key to a string here otherwise the | ||
-- course_names dictionary throws this: | ||
-- Key type for complex key at position 0 does not match, expected String, found LowCardinality(String). | ||
on course_names.course_key = enrollment.course_key::String |
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.
Doesn't this affect DBT reports too?
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.
dbt recreates everything with the type of the parent, so they almost all get converted to LowCardinality. LC types get automatically coerced into their parent type (String for us) in almost all cases, there have only been two places I found where it gets confused, both around dictionary joins.
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.
And custom reports that do the same join such as the fact_*_engagement
ones?
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.
The fact_*_engagement
charts are working as-is, but I can't guarantee what other custom reports might run into. That's likely a problem with a number of changes we've been making, though.
Don't use the user_pii table for user counts, since it may not be populated. Change this chart to be a count of active enrollments, which people have said is more useful.
Also changed the time range for operator dash to 90 days to improve performance of the actors / events graphs.
Closes: #788