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

At-risk dashboard performance enhancements #822

Merged
merged 4 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tutoraspects/patches/openedx-common-settings
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Copy link
Contributor Author

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

{% if ASPECTS_ENABLE_INSTRUCTOR_DASHBOARD_PLUGIN %}
try:
not OPEN_EDX_FILTERS_CONFIG
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \
pip install "platform-plugin-aspects==v0.9.2"
pip install "platform-plugin-aspects==v0.9.4"

RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \
pip install "edx-event-routing-backends==v9.0.1"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \
pip install "platform-plugin-aspects==v0.9.2"
pip install "platform-plugin-aspects==v0.9.4"

RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \
pip install "edx-event-routing-backends==v9.0.1"
4 changes: 3 additions & 1 deletion tutoraspects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"* [Superset Resources](https://github.com/apache/superset#resources)<br>",
),
("ASPECTS_ENABLE_INSTRUCTOR_DASHBOARD_PLUGIN", True),
# Whether to show the link to go to Superset in the instructor dashboard tab
("SUPERSET_SHOW_INSTRUCTOR_DASHBOARD_LINK", True),
Ian2012 marked this conversation as resolved.
Show resolved Hide resolved
# The following settings are used to configure the Superset dashboards
# in the LMS Instructor Dashboard.
(
Expand Down Expand Up @@ -346,7 +348,7 @@
# For now we are pulling this from github, which should allow maximum
# flexibility for forking, running branches, specific versions, etc.
("DBT_REPOSITORY", "https://github.com/openedx/aspects-dbt"),
("DBT_BRANCH", "v3.24.0"),
("DBT_BRANCH", "v3.25.0"),
("DBT_SSH_KEY", ""),
("DBT_STATE_DIR", "/app/aspects/dbt_state/"),
# This is the name of the database dbt will write to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,55 @@ params:
- name
- username
- email
- expressionType: SQL
label: Course Grade %
sqlExpression: round(course_grade*100, 2)
Ian2012 marked this conversation as resolved.
Show resolved Hide resolved
- last_visited
order_by_cols: []
order_desc: true
percent_metrics: []
query_mode: aggregate
row_limit: 1000
row_limit: 5000
server_page_length: 10
show_cell_bars: true
table_timestamp_format: smart_date
temporal_columns_lookup: {}
time_grain_sqla: P1D
timeseries_limit_metric:
aggregate: MAX
column:
advanced_data_type: null
certification_details: null
certified_by: null
column_name: course_grade
description: null
expression: null
filterable: true
groupby: true
id: 10990
is_certified: false
is_dttm: false
python_date_format: null
type: Float64
type_generic: 0
verbose_name: Course Grade
warning_markdown: null
datasourceWarning: false
expressionType: SIMPLE
hasCustomLabel: false
label: MAX(Course Grade)
optionName: metric_0woj6b3chi2_ihsomqnfpk9
sqlExpression: null
viz_type: table
query_context: '{"datasource":{"id":1180,"type":"table"},"force":false,"queries":[{"filters":[],"extras":{"time_grain_sqla":"P1D","having":"","where":""},"applied_time_extras":{},"columns":["name","username","email"],"metrics":[],"orderby":[],"annotation_layers":[],"row_limit":1000,"series_limit":0,"order_desc":true,"url_params":{},"custom_params":{},"custom_form_data":{},"post_processing":[]}],"form_data":{"datasource":"1180__table","viz_type":"table","slice_id":2128,"query_mode":"aggregate","groupby":["name","username","email"],"time_grain_sqla":"P1D","temporal_columns_lookup":{},"all_columns":[],"percent_metrics":[],"adhoc_filters":[],"order_by_cols":[],"row_limit":1000,"server_page_length":10,"order_desc":true,"table_timestamp_format":"smart_date","show_cell_bars":true,"color_pn":true,"extra_form_data":{},"dashboards":[6096],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}'
query_context: '{"datasource":{"id":991,"type":"table"},"force":false,"queries":[{"filters":[],"extras":{"time_grain_sqla":"P1D","having":"","where":""},"applied_time_extras":{},"columns":["name","username","email",{"expressionType":"SQL","label":"Course
Grade %","sqlExpression":"round(course_grade*100, 2)"},"last_visited"],"metrics":[],"orderby":[[{"aggregate":"MAX","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"course_grade","description":null,"expression":null,"filterable":true,"groupby":true,"id":10990,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"Float64","type_generic":0,"verbose_name":"Course
Grade","warning_markdown":null},"datasourceWarning":false,"expressionType":"SIMPLE","hasCustomLabel":false,"label":"MAX(Course
Grade)","optionName":"metric_0woj6b3chi2_ihsomqnfpk9","sqlExpression":null},false]],"annotation_layers":[],"row_limit":5000,"series_limit":0,"series_limit_metric":{"aggregate":"MAX","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"course_grade","description":null,"expression":null,"filterable":true,"groupby":true,"id":10990,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"Float64","type_generic":0,"verbose_name":"Course
Grade","warning_markdown":null},"datasourceWarning":false,"expressionType":"SIMPLE","hasCustomLabel":false,"label":"MAX(Course
Grade)","optionName":"metric_0woj6b3chi2_ihsomqnfpk9","sqlExpression":null},"order_desc":true,"url_params":{},"custom_params":{},"custom_form_data":{},"post_processing":[]}],"form_data":{"datasource":"991__table","viz_type":"table","slice_id":4124,"query_mode":"aggregate","groupby":["name","username","email",{"expressionType":"SQL","label":"Course
Grade %","sqlExpression":"round(course_grade*100, 2)"},"last_visited"],"time_grain_sqla":"P1D","temporal_columns_lookup":{},"all_columns":[],"percent_metrics":[],"adhoc_filters":[],"timeseries_limit_metric":{"aggregate":"MAX","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"course_grade","description":null,"expression":null,"filterable":true,"groupby":true,"id":10990,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"Float64","type_generic":0,"verbose_name":"Course
Grade","warning_markdown":null},"datasourceWarning":false,"expressionType":"SIMPLE","hasCustomLabel":false,"label":"MAX(Course
Grade)","optionName":"metric_0woj6b3chi2_ihsomqnfpk9","sqlExpression":null},"order_by_cols":[],"row_limit":5000,"server_page_length":10,"order_desc":true,"table_timestamp_format":"smart_date","show_cell_bars":true,"color_pn":true,"extra_form_data":{},"dashboards":[5608],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}'
slice_name: At-risk learners
uuid: 447a194b-dbed-4a82-a899-2df8e01e84b1
version: 1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ params:
y_axis_title_position: Left
query_context: '{"datasource":{"id":1299,"type":"table"},"force":false,"queries":[{"filters":[{"col":"started_at","op":"TEMPORAL_RANGE","val":"No
filter"}],"extras":{"time_grain_sqla":"P1D","having":"","where":""},"applied_time_extras":{},"columns":[{"timeGrain":"P1D","columnType":"BASE_AXIS","sqlExpression":"segment_start","label":"segment_start","expressionType":"SQL"}],"metrics":["unique_viewers","repeat_views"],"orderby":[["unique_viewers",false]],"annotation_layers":[],"row_limit":10000,"series_columns":[],"series_limit":0,"order_desc":true,"url_params":{},"custom_params":{},"custom_form_data":{},"time_offsets":[],"post_processing":[{"operation":"pivot","options":{"index":["segment_start"],"columns":[],"aggregates":{"unique_viewers":{"operator":"mean"},"repeat_views":{"operator":"mean"}},"drop_missing_columns":false}},{"operation":"flatten"}]}],"form_data":{"datasource":"1299__table","viz_type":"echarts_timeseries_bar","slice_id":2708,"x_axis":"segment_start","time_grain_sqla":"P1D","xAxisForceCategorical":true,"x_axis_sort_asc":true,"x_axis_sort_series":"name","x_axis_sort_series_ascending":true,"metrics":["unique_viewers","repeat_views"],"groupby":[],"adhoc_filters":[{"clause":"WHERE","comparator":"No
filter","expressionType":"SIMPLE","operator":"TEMPORAL_RANGE","subject":"started_at"}],"order_desc":true,"row_limit":10000,"truncate_metric":true,"show_empty_columns":true,"comparison_type":"values","annotation_layers":[],"forecastPeriods":10,"forecastInterval":0.8,"orientation":"vertical","x_axis_title":"Video Timestamp (in seconds)","x_axis_title_margin":50,"y_axis_title":"Number of Views","y_axis_title_margin":30,"y_axis_title_position":"Left","sort_series_type":"sum","color_scheme":"supersetColors","only_total":true,"show_legend":true,"legendType":"scroll","legendOrientation":"top","x_axis_time_format":"smart_date","xAxisLabelRotation":45,"y_axis_format":"SMART_NUMBER","truncateXAxis":true,"y_axis_bounds":[null,null],"rich_tooltip":true,"tooltipTimeFormat":"smart_date","extra_form_data":{},"dashboards":[6096],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}'
filter","expressionType":"SIMPLE","operator":"TEMPORAL_RANGE","subject":"started_at"}],"order_desc":true,"row_limit":10000,"truncate_metric":true,"show_empty_columns":true,"comparison_type":"values","annotation_layers":[],"forecastPeriods":10,"forecastInterval":0.8,"orientation":"vertical","x_axis_title":"Video
Timestamp (in seconds)","x_axis_title_margin":50,"y_axis_title":"Number of Views","y_axis_title_margin":30,"y_axis_title_position":"Left","sort_series_type":"sum","color_scheme":"supersetColors","only_total":true,"show_legend":true,"legendType":"scroll","legendOrientation":"top","x_axis_time_format":"smart_date","xAxisLabelRotation":45,"y_axis_format":"SMART_NUMBER","truncateXAxis":true,"y_axis_bounds":[null,null],"rich_tooltip":true,"tooltipTimeFormat":"smart_date","extra_form_data":{},"dashboards":[6096],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}'
slice_name: Watched Video Segments (at-risk)
uuid: a7947bdb-65a2-49ed-815e-850423bfeacc
version: 1.0.0
Expand Down
Loading