-
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
At-risk dashboard performance enhancements #822
Conversation
@@ -15,6 +15,7 @@ EVENT_SINK_CLICKHOUSE_PII_MODELS = {{ EVENT_SINK_PII_MODELS }} | |||
|
|||
ASPECTS_INSTRUCTOR_DASHBOARDS = {{ ASPECTS_INSTRUCTOR_DASHBOARDS }} | |||
SUPERSET_DASHBOARD_LOCALES = {{ SUPERSET_DASHBOARD_LOCALES }} | |||
SUPERSET_SHOW_INSTRUCTOR_DASHBOARD_LINK = {{ SUPERSET_SHOW_INSTRUCTOR_DASHBOARD_LINK }} |
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.
Needed for platform-plugin-aspects 0.9.4
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.
A couple of comments for the sql changes.
.../templates/aspects/build/aspects-superset/openedx-assets/assets/charts/At-risk_learners.yaml
Show resolved
Hide resolved
...plates/aspects/build/aspects-superset/openedx-assets/assets/dashboards/At-Risk_Learners.yaml
Show resolved
Hide resolved
tutoraspects/templates/openedx-assets/queries/at_risk_learner_filter.sql
Outdated
Show resolved
Hide resolved
page_visits as ( | ||
select org, course_key, actor_id, max(last_visited) as last_visited | ||
from {{ ASPECTS_XAPI_DATABASE }}.fact_learner_last_course_visit | ||
where | ||
1=1 | ||
{% include 'openedx-assets/queries/common_filters.sql' %} | ||
group by org, course_key, actor_id | ||
) |
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.
Same as above, usually the MV with org/course_key partition is good enough to improve the query times
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.
It definitely improves query times, but this does so even more. IIRC the MV took the query I was testing from running out of memory to about 12 seconds, this brought it down closer to 6.
@bmtcril rerunning CI checks with the emission time changes: https://github.com/openedx/tutor-contrib-aspects/actions/runs/9195812496/job/25292445072?pr=822 |
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.
All of the SQL changes look good to me!
Closing/reopening to re run tests with latest dbt changes |
This improves performance of the various charts of the at-risk dashboard. In the 300M row dataset all charts load now, though some are still slow. The problem engagement charts should be able to be improved by other changes in flight.
This also bumps platform-plugin-aspects to 0.9.4 and adds its new setting
Closes: #793
Closes: #792