Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ unioned as (
select
tenant_code,
api_year,
k_course,
k_course_section,
characteristic as course_level_characteristic
from unioned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
14 changes: 14 additions & 0 deletions models/core_warehouse/dim_course.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 -%}
Expand All @@ -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 -%}
Expand Down