Skip to content

Commit

Permalink
Merge pull request #2229 from TEAMSchools/spi-persistence
Browse files Browse the repository at this point in the history
Spi persistence
  • Loading branch information
anthonygwalters authored Nov 26, 2024
2 parents 0f1cc0b + 87d0326 commit 9061087
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__kfwd_spi.sql
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ select
case
when
e.school = ei.ecc_account_id
and r.ktc_cohort <= {{ var("current_academic_year") - 5 }}
and r.ktc_cohort <= {{ var("current_academic_year") - 4 }}
and e.status = 'Graduated'
and e.actual_end_date <= date(r.ktc_cohort + 4, 08, 31)
then 1
when
e.school = ei.ecc_account_id
and r.ktc_cohort <= {{ var("current_academic_year") - 5 }}
and r.ktc_cohort <= {{ var("current_academic_year") - 4 }}
and e.status = 'Graduated'
and e.actual_end_date > date(r.ktc_cohort + 4, 08, 31)
then 0
when
e.school = ei.ecc_account_id
and r.ktc_cohort <= {{ var("current_academic_year") - 5 }}
and r.ktc_cohort <= {{ var("current_academic_year") - 4 }}
and e.status != 'Graduated'
and e.actual_end_date is not null
then 0
Expand All @@ -76,24 +76,35 @@ select
case
when
e.school = ei.ecc_account_id
and r.ktc_cohort <= {{ var("current_academic_year") - 7 }}
and r.ktc_cohort <= {{ var("current_academic_year") - 6 }}
and e.status = 'Graduated'
and e.actual_end_date <= date(r.ktc_cohort + 6, 08, 31)
then 1
when
e.school = ei.ecc_account_id
and r.ktc_cohort <= {{ var("current_academic_year") - 7 }}
and r.ktc_cohort <= {{ var("current_academic_year") - 6 }}
and e.status = 'Graduated'
and e.actual_end_date > date(r.ktc_cohort + 6, 08, 31)
then 0
when
e.school = ei.ecc_account_id
and r.ktc_cohort <= {{ var("current_academic_year") - 7 }}
and r.ktc_cohort <= {{ var("current_academic_year") - 6 }}
and e.status != 'Graduated'
and e.actual_end_date is not null
then 0
end as is_6yr_grad_int,

case
when
r.ktc_cohort <= {{ var("current_academic_year") - 4 }}
and e.status = 'Graduated'
then 1
when
r.ktc_cohort <= {{ var("current_academic_year") - 4 }}
and e.status != 'Graduated'
then 0
end as is_grad_ever_any,

case
when r.contact_college_match_display_gpa >= 3.50
then '3.50+'
Expand Down Expand Up @@ -169,6 +180,7 @@ select
null as is_same_school,
null as is_4yr_grad_int,
null as is_6yr_grad_int,
null as is_grad_ever_any,

case
when r.contact_college_match_display_gpa >= 3.50
Expand Down

0 comments on commit 9061087

Please sign in to comment.