From 7b85a6a3901bcbbd6bc2b70109e5931932c95446 Mon Sep 17 00:00:00 2001 From: Cristhian Garcia Date: Mon, 9 Sep 2024 11:20:53 -0500 Subject: [PATCH] feat: unify *_link columns with display name --- models/problems/fact_problem_responses.sql | 5 ++--- models/problems/int_problem_results.sql | 4 ++-- models/problems/schema.yml | 6 ------ models/problems/section_problem_engagement.sql | 5 ++--- models/problems/subsection_problem_engagement.sql | 5 ++--- models/video/fact_video_plays.sql | 4 ++-- models/video/schema.yml | 3 --- 7 files changed, 10 insertions(+), 22 deletions(-) diff --git a/models/problems/fact_problem_responses.sql b/models/problems/fact_problem_responses.sql index 419a2474..a34035b7 100644 --- a/models/problems/fact_problem_responses.sql +++ b/models/problems/fact_problem_responses.sql @@ -23,8 +23,8 @@ select blocks.course_run as course_run, responses.problem_id as problem_id, blocks.block_name as problem_name, - blocks.display_name_with_location as problem_name_with_location, - {{ a_tag("responses.object_id", "blocks.block_name") }} as problem_link, + {{ a_tag("responses.object_id", "blocks.display_name_with_location") }} + as problem_name_with_location, blocks.graded as graded, course_order as course_order, responses.actor_id as actor_id, @@ -55,7 +55,6 @@ group by problem_id, problem_name, problem_name_with_location, - problem_link, actor_id, responses, success, diff --git a/models/problems/int_problem_results.sql b/models/problems/int_problem_results.sql index b708eab0..b0bb67f1 100644 --- a/models/problems/int_problem_results.sql +++ b/models/problems/int_problem_results.sql @@ -31,9 +31,9 @@ select blocks.course_run as course_run, full_responses.problem_id as problem_id, blocks.block_name as problem_name, - blocks.display_name_with_location as problem_name_with_location, + {{ a_tag("full_responses.object_id", "blocks.display_name_with_location") }} + as problem_name_with_location, blocks.course_order as course_order, - {{ a_tag("full_responses.object_id", "blocks.block_name") }} as problem_link, full_responses.actor_id as actor_id, full_responses.responses as responses, full_responses.success as success, diff --git a/models/problems/schema.yml b/models/problems/schema.yml index 2c49d727..2ccb8948 100644 --- a/models/problems/schema.yml +++ b/models/problems/schema.yml @@ -28,9 +28,6 @@ models: - name: problem_name_with_location data_type: String description: "The problem's display name with section, subsection, and unit prepended to the name. This provides additional context when looking at problem names and can help data consumers understand which problem they are analyzing" - - name: problem_link - data_type: String - description: "An anchor tag with a link to the problem" - name: graded data_type: Bool description: "Whether the block is graded" @@ -129,9 +126,6 @@ models: - name: problem_name_with_location data_type: String description: "The problem's display name with section, subsection, and unit prepended to the name. This provides additional context when looking at problem names and can help data consumers understand which problem they are analyzing" - - name: problem_link - data_type: String - description: "An anchor tag with a link to the problem" - name: actor_id data_type: String description: "The xAPI actor identifier" diff --git a/models/problems/section_problem_engagement.sql b/models/problems/section_problem_engagement.sql index fbb968fb..964fd58f 100644 --- a/models/problems/section_problem_engagement.sql +++ b/models/problems/section_problem_engagement.sql @@ -32,8 +32,8 @@ with blocks.course_name as course_name, responses.problem_id as problem_id, blocks.block_name as problem_name, - blocks.display_name_with_location as problem_name_with_location, - {{ a_tag("responses.object_id", "blocks.block_name") }} as problem_link, + {{ a_tag("responses.object_id", "blocks.display_name_with_location") }} + as problem_name_with_location, blocks.graded as graded, course_order as course_order, responses.actor_id as actor_id, @@ -60,7 +60,6 @@ with problem_id, problem_name, problem_name_with_location, - problem_link, actor_id, responses, success, diff --git a/models/problems/subsection_problem_engagement.sql b/models/problems/subsection_problem_engagement.sql index 14c9f3cb..7c73706f 100644 --- a/models/problems/subsection_problem_engagement.sql +++ b/models/problems/subsection_problem_engagement.sql @@ -32,8 +32,8 @@ with blocks.course_name as course_name, responses.problem_id as problem_id, blocks.block_name as problem_name, - blocks.display_name_with_location as problem_name_with_location, - {{ a_tag("responses.object_id", "blocks.block_name") }} as problem_link, + {{ a_tag("responses.object_id", "blocks.display_name_with_location") }} + as problem_name_with_location, blocks.graded as graded, course_order as course_order, responses.actor_id as actor_id, @@ -60,7 +60,6 @@ with problem_id, problem_name, problem_name_with_location, - problem_link, actor_id, responses, success, diff --git a/models/video/fact_video_plays.sql b/models/video/fact_video_plays.sql index 8ad09dc8..cffb50cf 100644 --- a/models/video/fact_video_plays.sql +++ b/models/video/fact_video_plays.sql @@ -24,8 +24,8 @@ select blocks.course_run as course_run, plays.video_id as video_id, blocks.block_name as video_name, - blocks.display_name_with_location as video_name_with_location, - {{ a_tag("plays.object_id", "blocks.block_name") }} as video_link, + {{ a_tag("plays.object_id", "blocks.display_name_with_location") }} + as video_name_with_location, blocks.graded as graded, plays.video_position as video_position, plays.video_duration as video_duration, diff --git a/models/video/schema.yml b/models/video/schema.yml index 00ac8ffa..a5581961 100644 --- a/models/video/schema.yml +++ b/models/video/schema.yml @@ -28,9 +28,6 @@ models: - name: video_name_with_location data_type: String description: "The name of the video with the section and subsection" - - name: video_link - data_type: String - description: "An anchor tag with a link to the video" - name: graded data_type: Boolean description: "Whether the block is graded"