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

feat: include section names in fact_video_plays (FC-0051) #73

Merged
merged 1 commit into from
Apr 19, 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
10 changes: 6 additions & 4 deletions models/video/fact_video_plays.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,18 @@ select
blocks.display_name_with_location as video_name_with_location,
{{ a_tag("plays.object_id", "blocks.block_name") }} as video_link,
blocks.graded as graded,
video_position,
video_duration,
plays.video_position as video_position,
plays.video_duration as video_duration,
{{ get_bucket("video_position/video_duration") }} as visualization_bucket,
plays.actor_id as actor_id,
users.username as username,
users.name as name,
users.email as email
users.email as email,
blocks.section_with_name as section_with_name,
blocks.subsection_with_name as subsection_with_name
from plays
join
{{ ref("dim_course_blocks") }} blocks
{{ ref("dim_course_blocks_extended") }} blocks
on (plays.course_key = blocks.course_key and plays.video_id = blocks.block_id)
left outer join
{{ ref("dim_user_pii") }} users on toUUID(actor_id) = users.external_user_id
6 changes: 6 additions & 0 deletions models/video/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ models:
- name: email
data_type: String
description: "The email address of the learner"
- name: section_with_name
data_type: string
description: "The name of the section this video belongs to, with section_number prepended"
- name: subsection_with_name
data_type: string
description: "The name of the subsection this video belongs to, with subsection_number prepended"

- name: fact_transcript_usage
description: "One record for each time a transcript or closed caption was enabled"
Expand Down