Skip to content

Commit

Permalink
Merge pull request #476 from SoryRawyer/rds/use-extended-block-names
Browse files Browse the repository at this point in the history
refactor: use extended block names in instructor dashboard (FC-0033)
  • Loading branch information
bmtcril authored Oct 18, 2023
2 parents 24a0f42 + d2145f0 commit 319decc
Show file tree
Hide file tree
Showing 25 changed files with 162 additions and 30 deletions.
2 changes: 1 addition & 1 deletion tutoraspects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,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", "v2.5"),
("DBT_BRANCH", "v2.6"),
# Path to the dbt project inside the repository
("DBT_REPOSITORY_PATH", "aspects-dbt"),
# This is a pip compliant list of Python packages to install to run dbt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ params:
datasource: 2__table
extra_form_data: {}
groupby:
- problem_name
- problem_name_with_location
metrics:
- aggregate: COUNT_DISTINCT
column:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ params:
extra_form_data: {}
granularity_sqla: emission_time
groupby:
- video_name
- video_name_with_location
metrics:
- count
- aggregate: COUNT_DISTINCT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ params:
extra_form_data: {}
granularity_sqla: emission_time
groupby:
- video_name
- video_name_with_location
metrics:
- count
- aggregate: COUNT_DISTINCT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,20 @@ metadata:
native_filter_configuration:
- cascadeParentIds: []
chartsInScope:
- 24
- 25
- 30
- 40
- 32
- 34
- 37
- 45
- 46
- 47
- 87
- 111
- 166
- 204
- 262
- 314
- 345
- 352
- 52
- 865
- 879
- 894
- 908
- 922
controlValues:
enableEmptyFilter: false
defaultDataMask:
Expand All @@ -106,6 +108,7 @@ metadata:
- TAB-pOd4znTAV
- TAB-7PGDduCA7
- TAB-CLiLC4zxo
- TAB-eE0OQxuju
targets:
- {}
type: NATIVE_FILTER
Expand Down Expand Up @@ -269,7 +272,7 @@ metadata:
- TAB-pOd4znTAV
targets:
- column:
name: problem_name
name: problem_name_with_location
datasetUuid: 008e2907-fc6b-45ef-bf85-73a04c5791ff
type: NATIVE_FILTER
- cascadeParentIds:
Expand Down Expand Up @@ -300,7 +303,7 @@ metadata:
- TAB-CLiLC4zxo
targets:
- column:
name: video_name
name: video_name_with_location
datasetUuid: 417b2035-8fa1-4c60-a405-4b1947c3c966
type: NATIVE_FILTER
refresh_frequency: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
_file_name: dim_course_problems.yaml
cache_timeout: null
columns:
- advanced_data_type: null
column_name: problem_name_with_location
description: null
expression: null
extra: null
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: String
verbose_name: null
- advanced_data_type: null
column_name: problem_name
description: null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
_file_name: dim_course_videos.yaml
cache_timeout: null
columns:
- advanced_data_type: null
column_name: video_name_with_location
description: null
expression: null
extra: null
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: String
verbose_name: null
- advanced_data_type: null
column_name: course_name
description: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ columns:
python_date_format: null
type: Bool
verbose_name: null
- advanced_data_type: null
column_name: problem_name_with_location
description: null
expression: null
extra: null
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: String
verbose_name: null
- advanced_data_type: null
column_name: problem_name
description: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ columns:
python_date_format: null
type: Bool
verbose_name: null
- advanced_data_type: null
column_name: problem_name_with_location
description: null
expression: null
extra: null
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: String
verbose_name: null
- advanced_data_type: null
column_name: problem_name
description: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ columns:
python_date_format: null
type: DateTime
verbose_name: null
- advanced_data_type: null
column_name: problem_name_with_location
description: null
expression: null
extra: null
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: String
verbose_name: null
- advanced_data_type: null
column_name: problem_name
description: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ columns:
python_date_format: null
type: DateTime
verbose_name: null
- advanced_data_type: null
column_name: video_name_with_location
description: null
expression: null
extra: {}
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: String
verbose_name: null
- advanced_data_type: null
column_name: actor_id
description: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ columns:
python_date_format: null
type: DateTime
verbose_name: null
- advanced_data_type: null
column_name: video_name_with_location
description: null
expression: null
extra: {}
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: String
verbose_name: null
- advanced_data_type: null
column_name: actor_id
description: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ columns:
python_date_format: null
type: DateTime
verbose_name: null
- advanced_data_type: null
column_name: video_name_with_location
description: null
expression: null
extra: {}
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: String
verbose_name: null
- advanced_data_type: null
column_name: actor_id
description: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ columns:
python_date_format: null
type: UInt64
verbose_name: null
- advanced_data_type: null
column_name: problem_name_with_location
description: null
expression: null
extra: null
filterable: true
groupby: true
is_active: true
is_dttm: false
python_date_format: null
type: String
verbose_name: null
- advanced_data_type: null
column_name: problem_name
description: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ select
course_key,
course_run,
block_id as problem_id,
block_name as problem_name
block_name as problem_name,
display_name_with_location as problem_name_with_location
from
{{ DBT_PROFILE_TARGET_DATABASE }}.dim_course_blocks
where
Expand All @@ -13,7 +14,7 @@ where
{% if filter_values('org') != [] %}
and org in {{ filter_values('org') | where_in }}
{% endif %}
{% if filter_values('problem_name') != [] %}
and problem_name in {{ filter_values('problem_name') | where_in }}
{% if filter_values('problem_name_with_location') != [] %}
and problem_name_with_location in {{ filter_values('problem_name_with_location') | where_in }}
{% endif %}
{%- endraw %}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ select
course_key,
course_run,
block_id as video_id,
block_name as video_name
block_name as video_name,
display_name_with_location as video_name_with_location
from
{{ DBT_PROFILE_TARGET_DATABASE }}.dim_course_blocks
where
Expand All @@ -13,7 +14,7 @@ where
{% if filter_values('org') != [] %}
and org in {{ filter_values('org') | where_in }}
{% endif %}
{% if filter_values('video_name') != [] %}
and video_name in {{ filter_values('video_name') | where_in }}
{% if filter_values('video_name_with_location') != [] %}
and video_name_with_location in {{ filter_values('video_name_with_location') | where_in }}
{% endif %}
{%- endraw %}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ WITH problem_responses AS (
course_run,
problem_id,
problem_name,
problem_name_with_location,
actor_id,
responses,
success,
Expand All @@ -76,6 +77,7 @@ WITH problem_responses AS (
course_name,
course_run,
problem_name,
problem_name_with_location,
actor_id,
success,
attempts,
Expand All @@ -98,6 +100,7 @@ WITH problem_responses AS (
course_name,
course_run,
problem_name,
problem_name_with_location,
actor_id,
NULL AS success,
NULL AS attempts,
Expand All @@ -122,6 +125,7 @@ SELECT
course_name,
course_run,
problem_name,
problem_name_with_location,
actor_id,
coalesce(any(success), false) AS success,
coalesce(any(attempts), 0) AS attempts,
Expand All @@ -142,4 +146,5 @@ GROUP BY
course_name,
course_run,
problem_name,
problem_name_with_location,
actor_id
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ WITH problem_responses AS (
course_run,
problem_id,
problem_name,
problem_name_with_location,
actor_id,
responses,
success,
Expand All @@ -76,6 +77,7 @@ WITH problem_responses AS (
course_name,
course_run,
problem_name,
problem_name_with_location,
actor_id,
success,
attempts,
Expand All @@ -89,6 +91,7 @@ WITH problem_responses AS (
course_name,
course_run,
problem_name,
problem_name_with_location,
actor_id,
NULL AS success,
NULL AS attempts,
Expand All @@ -106,6 +109,7 @@ SELECT
course_name,
course_run,
problem_name,
problem_name_with_location,
actor_id,
coalesce(any(success), false) AS success,
coalesce(any(attempts), 0) AS attempts,
Expand All @@ -114,8 +118,8 @@ SELECT
FROM summary
where
{% raw %}
{% if filter_values('problem_name') != [] %}
problem_name in {{ filter_values('problem_name') | where_in }}
{% if filter_values('problem_name_with_location') != [] %}
problem_name_with_location in {{ filter_values('problem_name_with_location') | where_in }}
{% else %}
1=0
{% endif %}
Expand All @@ -126,4 +130,5 @@ GROUP BY
course_name,
course_run,
problem_name,
problem_name_with_location,
actor_id
Loading

0 comments on commit 319decc

Please sign in to comment.