-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Anthony Walters
committed
Oct 3, 2024
1 parent
c720a65
commit 2ee6206
Showing
3 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/dbt/kipptaf/models/extracts/deanslist/rpt_deanslist__star.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
select | ||
student_display_id as student_number, | ||
academic_year, | ||
screening_period_window_name as test_round, | ||
state_benchmark_category_level, | ||
state_benchmark_category_name, | ||
state_benchmark_proficient, | ||
unified_score, | ||
|
||
concat(state_benchmark_category_name, ' (', unified_score, ')') as score_display, | ||
from {{ ref("int_renlearn__star_rollup") }} | ||
where rn_subj_round = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/dbt/kipptaf/models/renlearn/intermediate/int_renlearn__star_rollup.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
select | ||
student_display_id, | ||
state_benchmark_category_level, | ||
state_benchmark_category_name, | ||
state_benchmark_proficient, | ||
unified_score, | ||
screening_period_window_name, | ||
|
||
safe_cast(left(school_year, 4) as int) as academic_year, | ||
safe_cast(if(grade = 'K', '0', grade) as int) as grade_level, | ||
case | ||
when _dagster_partition_subject = 'SM' | ||
then 'Math' | ||
when _dagster_partition_subject = 'SR' | ||
then 'Reading' | ||
when _dagster_partition_subject = 'SEL' | ||
then 'Early Literacy' | ||
end as star_subject, | ||
case | ||
when _dagster_partition_subject = 'SM' | ||
then 'Math' | ||
when grade = 'K' and _dagster_partition_subject = 'SEL' | ||
then 'ELA' | ||
when _dagster_partition_subject = 'SR' | ||
then 'ELA' | ||
end as star_discipline, | ||
row_number() over ( | ||
partition by | ||
student_display_id, | ||
_dagster_partition_subject, | ||
school_year, | ||
screening_period_window_name | ||
order by completed_date desc | ||
) as rn_subj_round, | ||
row_number() over ( | ||
partition by | ||
student_display_id, | ||
_dagster_partition_subject, | ||
school_year, | ||
screening_period_window_name | ||
order by completed_date desc | ||
) as rn_subj_year, | ||
from {{ ref("stg_renlearn__star") }} | ||
where deactivation_reason is null |