From 8de17b449aec7783ab37f008c924a472a03579c6 Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 18:16:14 +0000 Subject: [PATCH 01/13] re-added iready to gradebook gpa view --- .../tableau/rpt_tableau__gradebook_gpa.sql | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql b/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql index bd69d9cdd..f804ff122 100644 --- a/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql +++ b/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql @@ -186,21 +186,17 @@ with m.rn_course_number_year = 1 and m.cc_sectionid > 0 and m.cc_course_number not in ( - 'LOG100', - 'LOG1010', - 'LOG11', - 'LOG12', - 'LOG20', - 'LOG22999XL', - 'LOG300', - 'LOG9', - 'SEM22106G1', - 'SEM22106S1', - 'SEM72005G1', - 'SEM72005G2', - 'SEM72005G3', - 'SEM72005G4', - 'SEM22101G1' + 'LOG100', -- Lunch + 'LOG1010', -- Lunch + 'LOG11', -- Lunch + 'LOG12', -- Lunch + 'LOG20', -- Early Dismissal + 'LOG22999XL', -- Lunch + 'LOG300', -- Study Hall + 'LOG9', -- Lunch + 'SEM22106G1', -- Advisory + 'SEM22106S1', -- Not in SY24-25 yet + 'SEM22101G1' -- Student Government ) ), From 4a79295dd4b7634361ce161dd507de4ca86e1a51 Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 19:27:02 +0000 Subject: [PATCH 02/13] added school id + course exclusion for audit --- ...t_powerschool__assignment_score_rollup.sql | 59 +++++++++++++++---- ...int_powerschool__gradebook_assignments.sql | 1 + 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql b/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql index 970e47567..5378f1f3d 100644 --- a/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql +++ b/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql @@ -1,6 +1,7 @@ with scores as ( select + a.sectionsdcid, a.assignmentsectionid, s.studentsdcid, @@ -32,19 +33,57 @@ with left join {{ ref("stg_powerschool__assignmentscore") }} as s on a.assignmentsectionid = s.assignmentsectionid + ), + + school_course_exemptions as ( + select + cc_yearid, + cc_schoolid, + cc_course_number, + cc_sectionid, + cc_sections_dcid, + + case + when + concat(cc_schoolid, cc_course_number) in ( + '73252SEM72250G1', + '73252SEM72250G2', + '73252SEM72250G3', + '73252SEM72250G4', + '133570965SEM72250G1', + '133570965SEM72250G2', + '133570965SEM72250G3', + '133570965SEM72250G4', + '133570965LOG300', + '73252LOG300', + '73258LOG300', + '732514LOG300', + '732513LOG300', + '732514GYM08035G1', + '732514GYM08036G2', + '732514GYM08037G3', + '732514GYM08038G4' + ) + then true + else false + end as exclude_from_audit + from {{ ref("base_powerschool__course_enrollments") }} + where cc_sectionid > 0 ) select - assignmentsectionid, + s.assignmentsectionid, - count(studentsdcid) as n_students, - sum(islate) as n_late, - sum(isexempt) as n_exempt, - sum(ismissing) as n_missing, + count(s.studentsdcid) as n_students, + sum(s.islate) as n_late, + sum(s.isexempt) as n_exempt, + sum(s.ismissing) as n_missing, - countif(is_expected) as n_expected, - countif(is_expected_scored) as n_expected_scored, + countif(s.is_expected) as n_expected, + countif(s.is_expected_scored) as n_expected_scored, - avg(if(is_expected_scored, score_percent, null)) as avg_expected_scored_percent, -from scores -group by assignmentsectionid + avg(if(s.is_expected_scored, s.score_percent, null)) as avg_expected_scored_percent, +from scores as s +left join school_course_exemptions as e on s.sections_dcid = e.sectionsdcid +where not e.exclude_from_audit +group by s.assignmentsectionid diff --git a/src/dbt/powerschool/models/intermediate/int_powerschool__gradebook_assignments.sql b/src/dbt/powerschool/models/intermediate/int_powerschool__gradebook_assignments.sql index 0a476e17c..4933ac0b1 100644 --- a/src/dbt/powerschool/models/intermediate/int_powerschool__gradebook_assignments.sql +++ b/src/dbt/powerschool/models/intermediate/int_powerschool__gradebook_assignments.sql @@ -1,6 +1,7 @@ with assignment_category as ( select + asec._dbt_source_relation, asec.assignmentsectionid, asec.sectionsdcid, asec.assignmentid, From 5917b9297040e7bcb8dd34695fc521760ca9abe8 Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 19:27:33 +0000 Subject: [PATCH 03/13] removed dbt relation from model --- .../intermediate/int_powerschool__gradebook_assignments.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dbt/powerschool/models/intermediate/int_powerschool__gradebook_assignments.sql b/src/dbt/powerschool/models/intermediate/int_powerschool__gradebook_assignments.sql index 4933ac0b1..0a476e17c 100644 --- a/src/dbt/powerschool/models/intermediate/int_powerschool__gradebook_assignments.sql +++ b/src/dbt/powerschool/models/intermediate/int_powerschool__gradebook_assignments.sql @@ -1,7 +1,6 @@ with assignment_category as ( select - asec._dbt_source_relation, asec.assignmentsectionid, asec.sectionsdcid, asec.assignmentid, From 22faa816a9f9f8f9d113fe1f7a3f2b66d341a782 Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 20:16:55 +0000 Subject: [PATCH 04/13] added new CTEs to student/teacher assignment audit to add exceptions --- .../tableau/rpt_tableau__gradebook_gpa.sql | 1 - ..._powerschool__student_assignment_audit.sql | 86 +++++++++++++++---- ..._powerschool__teacher_assignment_audit.sql | 82 ++++++++++++++---- 3 files changed, 133 insertions(+), 36 deletions(-) diff --git a/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql b/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql index f804ff122..62dc7ebfc 100644 --- a/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql +++ b/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql @@ -196,7 +196,6 @@ with 'LOG9', -- Lunch 'SEM22106G1', -- Advisory 'SEM22106S1', -- Not in SY24-25 yet - 'SEM22101G1' -- Student Government ) ), diff --git a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql index 21d399f7f..4589b2459 100644 --- a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql +++ b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql @@ -1,4 +1,60 @@ with + filtered_courses as ( + select + _dbt_source_relation, + cc_academic_year, + cc_yearid, + cc_schoolid, + students_dcid, + cc_studentid, + cc_course_number, + cc_sectionid, + sections_dcid, + cc_dateenrolled, + cc_dateleft, + + case + when + concat(cc_schoolid, cc_course_number) in ( + '73252SEM72250G1', + '73252SEM72250G2', + '73252SEM72250G3', + '73252SEM72250G4', + '133570965SEM72250G1', + '133570965SEM72250G2', + '133570965SEM72250G3', + '133570965SEM72250G4', + '133570965LOG300', + '73252LOG300', + '73258LOG300', + '732514LOG300', + '732513LOG300', + '732514GYM08035G1', + '732514GYM08036G2', + '732514GYM08037G3', + '732514GYM08038G4' + ) + then true + else false + end as exclude_from_audit + from {{ ref("base_powerschool__course_enrollments") }} + where + cc_sectionid > 0 + and courses_course_number not in ( + 'LOG100', -- Lunch + 'LOG1010', -- Lunch + 'LOG11', -- Lunch + 'LOG12', -- Lunch + 'LOG20', -- Early Dismissal + 'LOG22999XL', -- Lunch + 'LOG300', -- Study Hall + 'LOG9', -- Lunch + 'SEM22106G1', -- Advisory + 'SEM22106S1', -- Not in SY24-25 yet + 'SEM22101G1' -- Student Government + ) + ), + students_assignments as ( select ce._dbt_source_relation, @@ -37,7 +93,7 @@ with (a.totalpointvalue * s.scorepoints) / 100, s.scorepoints ) as score_converted, - from {{ ref("base_powerschool__course_enrollments") }} as ce + from filtered_courses as ce inner join {{ ref("stg_powerschool__schools") }} as sch on ce.cc_schoolid = sch.school_number @@ -73,23 +129,17 @@ with and {{ union_dataset_join_clause(left_alias="a", right_alias="s") }} where ce.cc_academic_year = {{ var("current_academic_year") }} - and ce.cc_sectionid > 0 - and ce.cc_course_number not in ( - 'HR', - 'LOG100', - 'LOG1010', - 'LOG11', - 'LOG12', - 'LOG20', - 'LOG22999XL', - 'LOG300', - 'LOG9', - 'SEM22106G1', - 'SEM22106S1' - 'SEM72005G1', - 'SEM72005G2', - 'SEM72005G3', - 'SEM72005G4' + and not ce.exclude_from_audit + -- leaves only WH category for iReady courses + and concat(ce.cc_course_number, ge.assignment_category_code) not in ( + 'SEM72005G1F', + 'SEM72005G2F', + 'SEM72005G3F', + 'SEM72005G4F', + 'SEM72005G1S', + 'SEM72005G2S', + 'SEM72005G3S', + 'SEM72005G4S' ) ) diff --git a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql index 48a60a139..d6cfc1369 100644 --- a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql +++ b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql @@ -1,4 +1,57 @@ with + filtered_sections as ( + select + _dbt_source_relation, + terms_yearid, + sections_schoolid, + sections_id, + sections_dcid, + terms_firstday, + terms_lastday, + sections_course_number, + teachernumber, + + case + when + concat(sections_schoolid, sections_course_number) in ( + '73252SEM72250G1', + '73252SEM72250G2', + '73252SEM72250G3', + '73252SEM72250G4', + '133570965SEM72250G1', + '133570965SEM72250G2', + '133570965SEM72250G3', + '133570965SEM72250G4', + '133570965LOG300', + '73252LOG300', + '73258LOG300', + '732514LOG300', + '732513LOG300', + '732514GYM08035G1', + '732514GYM08036G2', + '732514GYM08037G3', + '732514GYM08038G4' + ) + then true + else false + end as exclude_from_audit + from {{ ref("base_powerschool__sections") }} + where + courses_course_number not in ( + 'LOG100', -- Lunch + 'LOG1010', -- Lunch + 'LOG11', -- Lunch + 'LOG12', -- Lunch + 'LOG20', -- Early Dismissal + 'LOG22999XL', -- Lunch + 'LOG300', -- Study Hall + 'LOG9', -- Lunch + 'SEM22106G1', -- Advisory + 'SEM22106S1', -- Not in SY24-25 yet + 'SEM22101G1' -- Student Government + ) + ), + assignments as ( select sec._dbt_source_relation, @@ -95,7 +148,7 @@ with and c.week_number_quarter = ge.week_number and c.school_level = ge.school_level left join - {{ ref("base_powerschool__sections") }} as sec + filtered_sections as sec on c.schoolid = sec.sections_schoolid and c.yearid = sec.terms_yearid and c.week_end_date between sec.terms_firstday and sec.terms_lastday @@ -111,22 +164,17 @@ with on a.assignmentsectionid = asg.assignmentsectionid and {{ union_dataset_join_clause(left_alias="a", right_alias="asg") }} where - sec.sections_course_number not in ( - 'HR', - 'LOG100', - 'LOG1010', - 'LOG11', - 'LOG12', - 'LOG20', - 'LOG22999XL', - 'LOG300', - 'LOG9', - 'SEM22106G1', - 'SEM22106S1', - 'SEM72005G1', - 'SEM72005G2', - 'SEM72005G3', - 'SEM72005G4' + not sec.exclude_from_audit + -- leaves only WH category for iReady courses + and concat(sec.sections_course_number, ge.assignment_category_code) not in ( + 'SEM72005G1F', + 'SEM72005G2F', + 'SEM72005G3F', + 'SEM72005G4F', + 'SEM72005G1S', + 'SEM72005G2S', + 'SEM72005G3S', + 'SEM72005G4S' ) and sec.terms_firstday >= '{{ var("current_academic_year") }}-07-01' ) From b90852e7e4d6a025372f31e74186a875bf59fdb2 Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 20:17:56 +0000 Subject: [PATCH 05/13] removed extra comma --- .../models/extracts/tableau/rpt_tableau__gradebook_gpa.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql b/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql index 62dc7ebfc..460c1f948 100644 --- a/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql +++ b/src/dbt/kipptaf/models/extracts/tableau/rpt_tableau__gradebook_gpa.sql @@ -195,7 +195,7 @@ with 'LOG300', -- Study Hall 'LOG9', -- Lunch 'SEM22106G1', -- Advisory - 'SEM22106S1', -- Not in SY24-25 yet + 'SEM22106S1' -- Not in SY24-25 yet ) ), From 253d43fa7d4517cfbd3aeebc092df858d483fe23 Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 20:27:32 +0000 Subject: [PATCH 06/13] trunk --- .../int_powerschool__student_assignment_audit.sql | 2 +- .../int_powerschool__teacher_assignment_audit.sql | 2 +- .../int_powerschool__assignment_score_rollup.sql | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql index 4589b2459..1a983866d 100644 --- a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql +++ b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql @@ -36,7 +36,7 @@ with ) then true else false - end as exclude_from_audit + end as exclude_from_audit, from {{ ref("base_powerschool__course_enrollments") }} where cc_sectionid > 0 diff --git a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql index d6cfc1369..e0a88794f 100644 --- a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql +++ b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql @@ -34,7 +34,7 @@ with ) then true else false - end as exclude_from_audit + end as exclude_from_audit, from {{ ref("base_powerschool__sections") }} where courses_course_number not in ( diff --git a/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql b/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql index 5378f1f3d..7e7a5a302 100644 --- a/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql +++ b/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql @@ -35,7 +35,7 @@ with on a.assignmentsectionid = s.assignmentsectionid ), - school_course_exemptions as ( + school_course_exceptions as ( select cc_yearid, cc_schoolid, @@ -66,7 +66,7 @@ with ) then true else false - end as exclude_from_audit + end as exclude_from_audit, from {{ ref("base_powerschool__course_enrollments") }} where cc_sectionid > 0 ) @@ -84,6 +84,6 @@ select avg(if(s.is_expected_scored, s.score_percent, null)) as avg_expected_scored_percent, from scores as s -left join school_course_exemptions as e on s.sections_dcid = e.sectionsdcid +left join school_course_exceptions as e on s.sections_dcid = e.sectionsdcid where not e.exclude_from_audit group by s.assignmentsectionid From 4a036b627814123dac5140493ee6303daf1e6c55 Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 20:29:24 +0000 Subject: [PATCH 07/13] noqa dbt is high --- .../intermediate/int_powerschool__student_assignment_audit.sql | 2 +- .../intermediate/int_powerschool__assignment_score_rollup.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql index 1a983866d..dd8c0a327 100644 --- a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql +++ b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql @@ -12,7 +12,7 @@ with sections_dcid, cc_dateenrolled, cc_dateleft, - + -- noqa: ST02 case when concat(cc_schoolid, cc_course_number) in ( diff --git a/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql b/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql index 7e7a5a302..d2d041b11 100644 --- a/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql +++ b/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql @@ -42,7 +42,7 @@ with cc_course_number, cc_sectionid, cc_sections_dcid, - + -- noqa: ST02 case when concat(cc_schoolid, cc_course_number) in ( From fb2464cdd4253316217e9eb82e5e1d1da6c4185e Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 20:30:45 +0000 Subject: [PATCH 08/13] where do i noqa? --- .../int_powerschool__student_assignment_audit.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql index dd8c0a327..2ad52ff78 100644 --- a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql +++ b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql @@ -12,8 +12,8 @@ with sections_dcid, cc_dateenrolled, cc_dateleft, - -- noqa: ST02 - case + + case -- noqa: ST02 when concat(cc_schoolid, cc_course_number) in ( '73252SEM72250G1', From fb3a13ad60cc9516242df561586e96cc9468ed38 Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 20:31:38 +0000 Subject: [PATCH 09/13] !!!! --- .../int_powerschool__student_assignment_audit.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql index 2ad52ff78..0444283b1 100644 --- a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql +++ b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql @@ -13,7 +13,7 @@ with cc_dateenrolled, cc_dateleft, - case -- noqa: ST02 + case when concat(cc_schoolid, cc_course_number) in ( '73252SEM72250G1', @@ -36,7 +36,7 @@ with ) then true else false - end as exclude_from_audit, + end as exclude_from_audit, -- noqa: ST02 from {{ ref("base_powerschool__course_enrollments") }} where cc_sectionid > 0 From 07764af3f986a7dd2743e5abc96c4e98457d1299 Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 20:32:48 +0000 Subject: [PATCH 10/13] @($&@(# --- ..._powerschool__student_assignment_audit.sql | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql index 0444283b1..50427a6a5 100644 --- a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql +++ b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__student_assignment_audit.sql @@ -13,29 +13,29 @@ with cc_dateenrolled, cc_dateleft, - case - when - concat(cc_schoolid, cc_course_number) in ( - '73252SEM72250G1', - '73252SEM72250G2', - '73252SEM72250G3', - '73252SEM72250G4', - '133570965SEM72250G1', - '133570965SEM72250G2', - '133570965SEM72250G3', - '133570965SEM72250G4', - '133570965LOG300', - '73252LOG300', - '73258LOG300', - '732514LOG300', - '732513LOG300', - '732514GYM08035G1', - '732514GYM08036G2', - '732514GYM08037G3', - '732514GYM08038G4' - ) - then true - else false + case -- noqa: ST02 + when -- noqa: ST02 + concat(cc_schoolid, cc_course_number) in ( -- noqa: ST02 + '73252SEM72250G1', -- noqa: ST02 + '73252SEM72250G2', -- noqa: ST02 + '73252SEM72250G3', -- noqa: ST02 + '73252SEM72250G4', -- noqa: ST02 + '133570965SEM72250G1', -- noqa: ST02 + '133570965SEM72250G2', -- noqa: ST02 + '133570965SEM72250G3', -- noqa: ST02 + '133570965SEM72250G4', -- noqa: ST02 + '133570965LOG300', -- noqa: ST02 + '73252LOG300', -- noqa: ST02 + '73258LOG300', -- noqa: ST02 + '732514LOG300', -- noqa: ST02 + '732513LOG300', -- noqa: ST02 + '732514GYM08035G1', -- noqa: ST02 + '732514GYM08036G2', -- noqa: ST02 + '732514GYM08037G3', -- noqa: ST02 + '732514GYM08038G4' -- noqa: ST02 + ) -- noqa: ST02 + then true -- noqa: ST02 + else false -- noqa: ST02 end as exclude_from_audit, -- noqa: ST02 from {{ ref("base_powerschool__course_enrollments") }} where From b15a3a20fe2ed135dffeedf5552282c18963e56d Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 20:35:35 +0000 Subject: [PATCH 11/13] killed it with fire --- ..._powerschool__teacher_assignment_audit.sql | 48 +++++++++--------- ...t_powerschool__assignment_score_rollup.sql | 50 +++++++++---------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql index e0a88794f..3f0122305 100644 --- a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql +++ b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql @@ -11,30 +11,30 @@ with sections_course_number, teachernumber, - case - when - concat(sections_schoolid, sections_course_number) in ( - '73252SEM72250G1', - '73252SEM72250G2', - '73252SEM72250G3', - '73252SEM72250G4', - '133570965SEM72250G1', - '133570965SEM72250G2', - '133570965SEM72250G3', - '133570965SEM72250G4', - '133570965LOG300', - '73252LOG300', - '73258LOG300', - '732514LOG300', - '732513LOG300', - '732514GYM08035G1', - '732514GYM08036G2', - '732514GYM08037G3', - '732514GYM08038G4' - ) - then true - else false - end as exclude_from_audit, + case -- noqa: ST02 + when -- noqa: ST02 + concat(sections_schoolid, sections_course_number) in ( -- noqa: ST02 + '73252SEM72250G1', -- noqa: ST02 + '73252SEM72250G2', -- noqa: ST02 + '73252SEM72250G3', -- noqa: ST02 + '73252SEM72250G4', -- noqa: ST02 + '133570965SEM72250G1', -- noqa: ST02 + '133570965SEM72250G2', -- noqa: ST02 + '133570965SEM72250G3', -- noqa: ST02 + '133570965SEM72250G4', -- noqa: ST02 + '133570965LOG300', -- noqa: ST02 + '73252LOG300', -- noqa: ST02 + '73258LOG300', -- noqa: ST02 + '732514LOG300', -- noqa: ST02 + '732513LOG300', -- noqa: ST02 + '732514GYM08035G1', -- noqa: ST02 + '732514GYM08036G2', -- noqa: ST02 + '732514GYM08037G3', -- noqa: ST02 + '732514GYM08038G4' -- noqa: ST02 + ) -- noqa: ST02 + then true -- noqa: ST02 + else false -- noqa: ST02 + end as exclude_from_audit, -- noqa: ST02 from {{ ref("base_powerschool__sections") }} where courses_course_number not in ( diff --git a/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql b/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql index d2d041b11..e5ea3f3b7 100644 --- a/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql +++ b/src/dbt/powerschool/models/intermediate/int_powerschool__assignment_score_rollup.sql @@ -42,31 +42,31 @@ with cc_course_number, cc_sectionid, cc_sections_dcid, - -- noqa: ST02 - case - when - concat(cc_schoolid, cc_course_number) in ( - '73252SEM72250G1', - '73252SEM72250G2', - '73252SEM72250G3', - '73252SEM72250G4', - '133570965SEM72250G1', - '133570965SEM72250G2', - '133570965SEM72250G3', - '133570965SEM72250G4', - '133570965LOG300', - '73252LOG300', - '73258LOG300', - '732514LOG300', - '732513LOG300', - '732514GYM08035G1', - '732514GYM08036G2', - '732514GYM08037G3', - '732514GYM08038G4' - ) - then true - else false - end as exclude_from_audit, + + case -- noqa: ST02 + when -- noqa: ST02 + concat(cc_schoolid, cc_course_number) in ( -- noqa: ST02 + '73252SEM72250G1', -- noqa: ST02 + '73252SEM72250G2', -- noqa: ST02 + '73252SEM72250G3', -- noqa: ST02 + '73252SEM72250G4', -- noqa: ST02 + '133570965SEM72250G1', -- noqa: ST02 + '133570965SEM72250G2', -- noqa: ST02 + '133570965SEM72250G3', -- noqa: ST02 + '133570965SEM72250G4', -- noqa: ST02 + '133570965LOG300', -- noqa: ST02 + '73252LOG300', -- noqa: ST02 + '73258LOG300', -- noqa: ST02 + '732514LOG300', -- noqa: ST02 + '732513LOG300', -- noqa: ST02 + '732514GYM08035G1', -- noqa: ST02 + '732514GYM08036G2', -- noqa: ST02 + '732514GYM08037G3', -- noqa: ST02 + '732514GYM08038G4' -- noqa: ST02 + ) -- noqa: ST02 + then true -- noqa: ST02 + else false -- noqa: ST02 + end as exclude_from_audit, -- noqa: ST02 from {{ ref("base_powerschool__course_enrollments") }} where cc_sectionid > 0 ) From 6c95fafcb6ca0164542be204d361c0230dc8395a Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 20:37:33 +0000 Subject: [PATCH 12/13] ... --- .../intermediate/int_powerschool__teacher_assignment_audit.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql index 3f0122305..94710428a 100644 --- a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql +++ b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql @@ -13,7 +13,7 @@ with case -- noqa: ST02 when -- noqa: ST02 - concat(sections_schoolid, sections_course_number) in ( -- noqa: ST02 + concat(sections_schoolid, sections_course_number) in ( '73252SEM72250G1', -- noqa: ST02 '73252SEM72250G2', -- noqa: ST02 '73252SEM72250G3', -- noqa: ST02 From 0cb62e4f237b28ab5ba97c71cba2bb5c47406d74 Mon Sep 17 00:00:00 2001 From: Gaby Rangel Date: Tue, 1 Oct 2024 20:39:41 +0000 Subject: [PATCH 13/13] both noqa --- .../intermediate/int_powerschool__teacher_assignment_audit.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql index 94710428a..c874ac379 100644 --- a/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql +++ b/src/dbt/kipptaf/models/powerschool/intermediate/int_powerschool__teacher_assignment_audit.sql @@ -13,7 +13,7 @@ with case -- noqa: ST02 when -- noqa: ST02 - concat(sections_schoolid, sections_course_number) in ( + concat(sections_schoolid, sections_course_number) in ( -- noqa: ST02,LT05 '73252SEM72250G1', -- noqa: ST02 '73252SEM72250G2', -- noqa: ST02 '73252SEM72250G3', -- noqa: ST02