From 3827252edbcaf88c915907bab39178d28f35873f Mon Sep 17 00:00:00 2001 From: Cristhian Garcia Date: Wed, 25 Sep 2024 15:51:59 -0500 Subject: [PATCH] fix(sql): add object_id to watched video segments --- .../openedx-assets/queries/fact_watched_video_segments.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tutoraspects/templates/openedx-assets/queries/fact_watched_video_segments.sql b/tutoraspects/templates/openedx-assets/queries/fact_watched_video_segments.sql index a0fbbd416..ccb109a9c 100644 --- a/tutoraspects/templates/openedx-assets/queries/fact_watched_video_segments.sql +++ b/tutoraspects/templates/openedx-assets/queries/fact_watched_video_segments.sql @@ -5,6 +5,7 @@ with org, course_key, splitByString('/xblock/', object_id)[-1] as video_id, + object_id, actor_id, verb_id, video_position, @@ -34,6 +35,7 @@ with starts.course_key as course_key, starts.video_id as video_id, starts.actor_id, + starts.object_id as object_id, cast(starts.video_position as Int32) as start_position, cast(ends.video_position as Int32) as end_position, starts.emission_time as started_at, @@ -62,6 +64,7 @@ with blocks.block_name as video_name, blocks.display_name_with_location as video_name_with_location, segments.actor_id as actor_id, + segments.object_id as object_id, segments.started_at as started_at, segments.start_position - (segments.start_position % 5) as start_position, segments.end_position - (segments.end_position % 5) as end_position, @@ -86,6 +89,9 @@ select video_name, video_name_with_location, video_id, + concat( + '', video_name_with_location, '' + ) as video_link, actor_id, started_at, arrayJoin(range(start_position, end_position, 5)) as segment_start,