Skip to content

Commit

Permalink
Merge pull request #839 from openedx/bmtcril/operator_dash_fixes
Browse files Browse the repository at this point in the history
fix: Operator dash user counts, performance
  • Loading branch information
Cristhian Garcia authored May 31, 2024
2 parents 8c0c4bb + 27e412f commit 508383e
Show file tree
Hide file tree
Showing 13 changed files with 545 additions and 146 deletions.
2 changes: 1 addition & 1 deletion tutoraspects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,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.28.1"),
("DBT_BRANCH", "v3.29.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 @@ -22,6 +22,7 @@ aspects: # this needs to match the profile in your dbt_project.yml file
check_exchange: false
sync_request_timeout: 5
compress_block_size: 1048576
threads: 2

# Without this dbt queries populating tables can be killed for using too much memory
custom_settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ params:
expressionType: SIMPLE
operator: TEMPORAL_RANGE
subject: emission_hour
- clause: WHERE
comparator: No filter
expressionType: SIMPLE
operator: TEMPORAL_RANGE
subject: emission_day
annotation_layers: []
area: false
color_scheme: supersetColors
Expand Down Expand Up @@ -50,7 +55,7 @@ params:
truncateYAxis: false
truncate_metric: true
viz_type: echarts_timeseries_line
x_axis: emission_hour
x_axis: emission_day
x_axis_sort_asc: true
x_axis_sort_series: name
x_axis_sort_series_ascending: true
Expand All @@ -75,12 +80,17 @@ query_context:
expressionType: SIMPLE
operator: TEMPORAL_RANGE
subject: emission_hour
- clause: WHERE
comparator: No filter
expressionType: SIMPLE
operator: TEMPORAL_RANGE
subject: emission_day
annotation_layers: []
area: false
color_scheme: supersetColors
comparison_type: values
dashboards:
- 2422
- 6085
datasource: 84__table
extra_form_data: {}
force: false
Expand Down Expand Up @@ -121,7 +131,7 @@ query_context:
truncateYAxis: false
truncate_metric: true
viz_type: echarts_timeseries_line
x_axis: emission_hour
x_axis: emission_day
x_axis_sort_asc: true
x_axis_sort_series: name
x_axis_sort_series_ascending: true
Expand All @@ -140,8 +150,8 @@ query_context:
columns:
- columnType: BASE_AXIS
expressionType: SQL
label: emission_hour
sqlExpression: emission_hour
label: emission_day
sqlExpression: emission_day
timeGrain: P1D
custom_form_data: {}
custom_params: {}
Expand All @@ -153,6 +163,9 @@ query_context:
- col: emission_hour
op: TEMPORAL_RANGE
val: No filter
- col: emission_day
op: TEMPORAL_RANGE
val: No filter
metrics:
- aggregate: null
column: null
Expand Down Expand Up @@ -182,7 +195,7 @@ query_context:
columns: []
drop_missing_columns: false
index:
- emission_hour
- emission_day
- operation: flatten
row_limit: 10000
series_columns: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ params:
adhoc_filters:
- clause: WHERE
comparator: No filter
datasourceWarning: false
expressionType: SIMPLE
filterOptionName: filter_9gtqohcrryq_u40bqg9f25
isExtra: false
isNew: false
operator: TEMPORAL_RANGE
subject: emission_hour
sqlExpression: null
subject: emission_day
annotation_layers: []
color_scheme: supersetColors
comparison_type: values
Expand Down Expand Up @@ -63,7 +68,7 @@ params:
truncateXAxis: true
truncate_metric: true
viz_type: echarts_timeseries_line
x_axis: emission_hour
x_axis: emission_day
x_axis_sort_asc: true
x_axis_sort_series: name
x_axis_sort_series_ascending: true
Expand All @@ -78,7 +83,195 @@ params:
y_axis_title_margin: 50
y_axis_title_position: Left
zoomable: true
query_context: null
query_context:
datasource:
id: 50
type: table
force: false
form_data:
adhoc_filters:
- clause: WHERE
comparator: No filter
datasourceWarning: false
expressionType: SIMPLE
filterOptionName: filter_9gtqohcrryq_u40bqg9f25
isExtra: false
isNew: false
operator: TEMPORAL_RANGE
sqlExpression: null
subject: emission_day
annotation_layers: []
color_scheme: supersetColors
comparison_type: values
dashboards:
- 6085
datasource: 50__table
extra_form_data: {}
force: false
forecastInterval: 0.8
forecastPeriods: 10
groupby:
- enrollment_status
legendMargin: null
legendOrientation: top
legendType: scroll
markerEnabled: false
markerSize: 6
metrics:
- aggregate: SUM
column:
advanced_data_type: null
certification_details: null
certified_by: null
column_name: course_enrollment_mode_status_cnt
description: null
expression: null
filterable: true
groupby: true
id: 6180
is_certified: false
is_dttm: false
python_date_format: null
type: UINT64
type_generic: 0
verbose_name: null
warning_markdown: null
datasourceWarning: false
expressionType: SIMPLE
hasCustomLabel: true
label: Number of Enrollments
optionName: metric_amismcbqmww_5nvldnd54mv
sqlExpression: null
only_total: true
opacity: 0.2
order_desc: true
result_format: json
result_type: full
rich_tooltip: true
row_limit: 50000
seriesType: line
show_empty_columns: true
show_legend: false
slice_id: 2801
sort_series_type: sum
time_grain_sqla: P1D
tooltipTimeFormat: smart_date
truncateXAxis: true
truncate_metric: true
viz_type: echarts_timeseries_line
x_axis: emission_day
x_axis_sort_asc: true
x_axis_sort_series: name
x_axis_sort_series_ascending: true
x_axis_time_format: smart_date
x_axis_title: ''
x_axis_title_margin: 15
y_axis_bounds:
- null
- null
y_axis_format: SMART_NUMBER
y_axis_title: Registration Events
y_axis_title_margin: 50
y_axis_title_position: Left
zoomable: true
queries:
- annotation_layers: []
applied_time_extras: {}
columns:
- columnType: BASE_AXIS
expressionType: SQL
label: emission_day
sqlExpression: emission_day
timeGrain: P1D
- enrollment_status
custom_form_data: {}
custom_params: {}
extras:
having: ''
time_grain_sqla: P1D
where: ''
filters:
- col: emission_day
op: TEMPORAL_RANGE
val: No filter
metrics:
- aggregate: SUM
column:
advanced_data_type: null
certification_details: null
certified_by: null
column_name: course_enrollment_mode_status_cnt
description: null
expression: null
filterable: true
groupby: true
id: 6180
is_certified: false
is_dttm: false
python_date_format: null
type: UINT64
type_generic: 0
verbose_name: null
warning_markdown: null
datasourceWarning: false
expressionType: SIMPLE
hasCustomLabel: true
label: Number of Enrollments
optionName: metric_amismcbqmww_5nvldnd54mv
sqlExpression: null
order_desc: true
orderby:
- - aggregate: SUM
column:
advanced_data_type: null
certification_details: null
certified_by: null
column_name: course_enrollment_mode_status_cnt
description: null
expression: null
filterable: true
groupby: true
id: 6180
is_certified: false
is_dttm: false
python_date_format: null
type: UINT64
type_generic: 0
verbose_name: null
warning_markdown: null
datasourceWarning: false
expressionType: SIMPLE
hasCustomLabel: true
label: Number of Enrollments
optionName: metric_amismcbqmww_5nvldnd54mv
sqlExpression: null
- false
post_processing:
- operation: pivot
options:
aggregates:
Number of Enrollments:
operator: mean
columns:
- enrollment_status
drop_missing_columns: false
index:
- emission_day
- operation: rename
options:
columns:
Number of Enrollments: null
inplace: true
level: 0
- operation: flatten
row_limit: 50000
series_columns:
- enrollment_status
series_limit: 0
time_offsets: []
url_params: {}
result_format: json
result_type: full
slice_name: Course Enrollments Over Time
uuid: bf4f4671-c276-4185-9b9a-b10864efea6c
version: 1.0.0
Expand Down
Loading

0 comments on commit 508383e

Please sign in to comment.