From 0a087ea2eadcc9bc53ca06d0e07dbff2f8b6916b Mon Sep 17 00:00:00 2001 From: Ryan Aguilar Date: Mon, 18 May 2026 14:22:06 -0400 Subject: [PATCH 1/3] Add course characteristics to dim_course --- .../bld_ef3__course_char__combined_long.sql | 1 + .../bld_ef3__course_char__combined_wide.sql | 1 + models/core_warehouse/dim_course.sql | 14 ++++++++++++++ 3 files changed, 16 insertions(+) diff --git a/models/build/edfi_3/courses/bld_ef3__course_char__combined_long.sql b/models/build/edfi_3/courses/bld_ef3__course_char__combined_long.sql index d18af013..801153c5 100644 --- a/models/build/edfi_3/courses/bld_ef3__course_char__combined_long.sql +++ b/models/build/edfi_3/courses/bld_ef3__course_char__combined_long.sql @@ -63,6 +63,7 @@ unioned as ( select tenant_code, api_year, + k_course, k_course_section, characteristic as course_level_characteristic from unioned diff --git a/models/build/edfi_3/courses/bld_ef3__course_char__combined_wide.sql b/models/build/edfi_3/courses/bld_ef3__course_char__combined_wide.sql index 7a8ae21e..90ddc4f5 100644 --- a/models/build/edfi_3/courses/bld_ef3__course_char__combined_wide.sql +++ b/models/build/edfi_3/courses/bld_ef3__course_char__combined_wide.sql @@ -9,6 +9,7 @@ pivoted as ( select tenant_code, api_year, + k_course, k_course_section, {{ edu_edfi_source.json_array_agg( 'course_level_characteristic', diff --git a/models/core_warehouse/dim_course.sql b/models/core_warehouse/dim_course.sql index bed782a1..626bae66 100644 --- a/models/core_warehouse/dim_course.sql +++ b/models/core_warehouse/dim_course.sql @@ -19,6 +19,9 @@ bld_ef3__wide_ids_course as ( bld_ef3__course_subject as ( select * from {{ ref('bld_ef3__course_subject') }} ), +course_chars as ( + select * from {{ ref('bld_ef3__course_char__combined_wide') }} +), formatted as ( select stg_course.k_course, @@ -50,6 +53,15 @@ formatted as ( stg_course.number_of_parts, stg_course.time_required_for_completion, + -- course characteristics + {{ accordion_columns( + source_table='bld_ef3__course_char__combined_wide', + exclude_columns=['tenant_code', 'api_year', 'k_course', 'k_course_offering', 'course_level_characteristics_array'], + source_alias='course_chars', + coalesce_value = 'FALSE' + ) }} + course_chars.course_level_characteristics_array, + -- custom indicators {% if custom_data_sources is not none and custom_data_sources | length -%} {%- for source in custom_data_sources -%} @@ -67,6 +79,8 @@ formatted as ( on stg_course.k_course = bld_ef3__wide_ids_course.k_course left join bld_ef3__course_subject on stg_course.k_course = bld_ef3__course_subject.k_course + left join course_chars + on stg_course.k_course = course_chars.k_course -- custom data sources {% if custom_data_sources is not none and custom_data_sources | length -%} From b74ee1680ac11076a508522b21e151c71a785598 Mon Sep 17 00:00:00 2001 From: Ryan Aguilar Date: Fri, 5 Jun 2026 06:15:59 -0400 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec85d368..0125173f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased ## New features +- Add `course_characteristics` array column to `dim_course`. This column was previously added to `dim_course_section`. ## Under the hood ## Fixes From 9bd97612b6c782881cb4f4a5f5eec6bae0d6fded Mon Sep 17 00:00:00 2001 From: Ryan Aguilar Date: Fri, 5 Jun 2026 06:18:31 -0400 Subject: [PATCH 3/3] Fix documentation column name --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0125173f..550378cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Unreleased ## New features -- Add `course_characteristics` array column to `dim_course`. This column was previously added to `dim_course_section`. +- Add `course_level_characteristics_array` column to `dim_course`. This column was previously added to `dim_course_section`. ## Under the hood ## Fixes