Skip to content

Commit

Permalink
fix: add video_link to fact_video_watches dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Sep 20, 2024
1 parent 981140a commit 84ae949
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ select
subsection_with_name,
video_name,
video_name_with_location,
concat(
'<a href="', video_id, '" target="_blank">', video_name_with_location, '</a>'
) as video_link,
actor_id,
username,
email,
Expand Down Expand Up @@ -42,6 +45,7 @@ group by
video_name,
video_name_with_location,
actor_id,
video_id,
video_segment_count,
username,
email,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ with
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,
segments.video_duration as video_duration
segments.video_duration as video_duration,
segments.video_id as video_id
from segments
join
{{ DBT_PROFILE_TARGET_DATABASE }}.dim_course_blocks_extended blocks
Expand All @@ -84,6 +85,7 @@ select
subsection_with_name,
video_name,
video_name_with_location,
video_id,
actor_id,
started_at,
arrayJoin(range(start_position, end_position, 5)) as segment_start,
Expand Down

0 comments on commit 84ae949

Please sign in to comment.