Skip to content

Commit

Permalink
update to simplify content_area logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliazm99 committed Nov 26, 2024
1 parent 5616106 commit 7ca522c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dbt/models/staging/dashboard/stg_dashboard__scripts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ final as (
case
when course_name = 'hoc'
then 'hoc' -- If course_name is HOC, content area is HOC too
when nullif(content_area,'') is null then 'other' -- If content area is null then 'other' to align with course_name
else nullif(content_area,'')
when content_area is null then 'other' -- If content area is null then 'other' to align with course_name
when content_area = '' then 'other' -- If content area is empty then 'other' to align with course_name
else content_area
end as content_area,
nullif(topic_tags_list,'') as topic_tags,
created_at,
Expand Down

0 comments on commit 7ca522c

Please sign in to comment.