From cf063edd666416d30e1b45e35f98c25fdb931174 Mon Sep 17 00:00:00 2001 From: Ryan Aguilar Date: Mon, 5 Jan 2026 12:03:51 -0500 Subject: [PATCH 01/11] Initial commit --- .../dim_performance_evaluation.sql | 30 +++++++++++++++++++ .../dim_performance_evaluation.yml | 0 2 files changed, 30 insertions(+) create mode 100644 models/tpdm_warehouse/dim_performance_evaluation.sql create mode 100644 models/tpdm_warehouse/dim_performance_evaluation.yml diff --git a/models/tpdm_warehouse/dim_performance_evaluation.sql b/models/tpdm_warehouse/dim_performance_evaluation.sql new file mode 100644 index 00000000..aaa6ae05 --- /dev/null +++ b/models/tpdm_warehouse/dim_performance_evaluation.sql @@ -0,0 +1,30 @@ +{{ + config( + post_hook=[ + "alter table {{ this }} alter column k_performance_evaluation set not null", + "alter table {{ this }} add primary key (k_performance_evaluation)", + ] + ) +}} + +with stg_perf_eval as ( + select * from {{ ref('stg_tpdm__performance_evaluations') }} +), + +formatted as ( + select + stg_perf_eval.k_performance_evaluation, + stg_perf_eval.tenant_code, + stg_perf_eaval.school_year, + stg_perf_eval.ed_org_id, + stg_perf_eval.evaluation_period, + stg_perf_eval.performance_evaluation_title, + stg_perf_eval.performance_evaluation_type, + stg_perf_eval.academic_term, + stg_perf_eval.academic_subject, + stg_perf_eval.v_grade_levels, + stg_perf_eval.v_rating_levels + {{ edu_edfi_source.extract_extension(model_name='stg_tpdm__performance_evaluations', flatten=False) }} + from stg_perf_eval +) +select * from formatted diff --git a/models/tpdm_warehouse/dim_performance_evaluation.yml b/models/tpdm_warehouse/dim_performance_evaluation.yml new file mode 100644 index 00000000..e69de29b From f53e82eb330d936b069bf2beb1b5b0553f34afd2 Mon Sep 17 00:00:00 2001 From: Ryan Aguilar Date: Fri, 9 Jan 2026 12:37:46 -0500 Subject: [PATCH 02/11] Fix typo --- models/tpdm_warehouse/dim_performance_evaluation.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/tpdm_warehouse/dim_performance_evaluation.sql b/models/tpdm_warehouse/dim_performance_evaluation.sql index aaa6ae05..337a9102 100644 --- a/models/tpdm_warehouse/dim_performance_evaluation.sql +++ b/models/tpdm_warehouse/dim_performance_evaluation.sql @@ -15,7 +15,7 @@ formatted as ( select stg_perf_eval.k_performance_evaluation, stg_perf_eval.tenant_code, - stg_perf_eaval.school_year, + stg_perf_eval.school_year, stg_perf_eval.ed_org_id, stg_perf_eval.evaluation_period, stg_perf_eval.performance_evaluation_title, From 316c526dcf66a99b8e0dce11a031d5ad2a2a7e3b Mon Sep 17 00:00:00 2001 From: Ryan Aguilar Date: Fri, 9 Jan 2026 12:38:10 -0500 Subject: [PATCH 03/11] Clear perf eval yml --- .../tpdm_warehouse/dim_performance_evaluation.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/models/tpdm_warehouse/dim_performance_evaluation.yml b/models/tpdm_warehouse/dim_performance_evaluation.yml index e69de29b..a0675447 100644 --- a/models/tpdm_warehouse/dim_performance_evaluation.yml +++ b/models/tpdm_warehouse/dim_performance_evaluation.yml @@ -0,0 +1,13 @@ +version: 2 + +models: + - name: dim_performance_evaluation + description: > + ##### Overview: + A performance evaluation of an educator, typically regularly scheduled and uniformly applied, composed of one or more Evaluations. + + ##### Primary Key: + `k_performance_evaluation` - There is one record per performance evaluation ... ? + config: + tags: ['tpdm'] + enabled: "{{ var('edu:tpdm:enabled', False) }}" \ No newline at end of file From eb2622525bff30ee588b2a27c345efeb06f87df5 Mon Sep 17 00:00:00 2001 From: Ryan Aguilar Date: Fri, 9 Jan 2026 14:17:59 -0500 Subject: [PATCH 04/11] Add columns --- .../fct_performance_evaluation_rating.sql | 30 +++++++++++++++++++ .../fct_performance_evaluation_rating.yml | 12 ++++++++ 2 files changed, 42 insertions(+) create mode 100644 models/tpdm_warehouse/fct_performance_evaluation_rating.sql create mode 100644 models/tpdm_warehouse/fct_performance_evaluation_rating.yml diff --git a/models/tpdm_warehouse/fct_performance_evaluation_rating.sql b/models/tpdm_warehouse/fct_performance_evaluation_rating.sql new file mode 100644 index 00000000..901a94b7 --- /dev/null +++ b/models/tpdm_warehouse/fct_performance_evaluation_rating.sql @@ -0,0 +1,30 @@ +with stg_perf_eval_rating as ( + select * from {{ ref('stg_tpdm__performance_evaluation_ratings') }} +), + +formatted as ( + select + stg_perf_eval_rating.k_person, + stg_perf_eval_rating.k_performance_evaluation, + stg_perf_eval_rating.tenant_code, + stg_perf_eval_rating.school_year, + stg_perf_eval_rating.ed_org_id, + stg_perf_eval_rating.evaluation_period, + stg_perf_eval_rating.performance_evaluation_title, + stg_perf_eval_rating.performance_evaluation_type, + stg_perf_eval_rating.person_id, + stg_perf_eval_rating.source_system, + stg_perf_eval_rating.academic_term, + stg_perf_eval_rating.actual_time, + stg_perf_eval_rating.schedule_date, + stg_perf_eval_rating.actual_date, + stg_perf_eval_rating.comments, + stg_perf_eval_rating.actual_duration, + stg_perf_eval_rating.is_announced, + stg_perf_eval_rating.performance_evaluation_rating_level, + stg_perf_eval_rating.coteaching_style_observed, + stg_perf_eval_rating.reviewers, + stg_perf_eval_rating.results + from stg_perf_eval_rating +) +select * from formatted diff --git a/models/tpdm_warehouse/fct_performance_evaluation_rating.yml b/models/tpdm_warehouse/fct_performance_evaluation_rating.yml new file mode 100644 index 00000000..7ad12f91 --- /dev/null +++ b/models/tpdm_warehouse/fct_performance_evaluation_rating.yml @@ -0,0 +1,12 @@ +version: 2 + +models: + - name: fct_performance_evaluation_rating + description: > + ##### Overview: + The summary rating for a Performance Evaluation across all Evaluation instruments for an individual educator. + + + config: + tags: ['tpdm'] + enabled: "{{ var('edu:tpdm:enabled', False) }}" \ No newline at end of file From d81e0dae2c7a6674a9fdab44e1177aedb458af08 Mon Sep 17 00:00:00 2001 From: Ryan Aguilar Date: Fri, 9 Jan 2026 14:20:01 -0500 Subject: [PATCH 05/11] Remove comment --- models/tpdm_warehouse/dim_performance_evaluation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/tpdm_warehouse/dim_performance_evaluation.yml b/models/tpdm_warehouse/dim_performance_evaluation.yml index a0675447..a5ad88ad 100644 --- a/models/tpdm_warehouse/dim_performance_evaluation.yml +++ b/models/tpdm_warehouse/dim_performance_evaluation.yml @@ -7,7 +7,7 @@ models: A performance evaluation of an educator, typically regularly scheduled and uniformly applied, composed of one or more Evaluations. ##### Primary Key: - `k_performance_evaluation` - There is one record per performance evaluation ... ? + `k_performance_evaluation` - There is one record per performance evaluation. config: tags: ['tpdm'] enabled: "{{ var('edu:tpdm:enabled', False) }}" \ No newline at end of file From 9b85f3c8cf244eaac95dea3c909fd61a97352568 Mon Sep 17 00:00:00 2001 From: Rob Little Date: Thu, 12 Feb 2026 13:10:49 -0600 Subject: [PATCH 06/11] add school year to fct models where it was missing (#215) * add school year to fct models where it was missing * update changelog --- CHANGELOG.md | 2 + .../fct_student_daily_attendance.sql | 3 ++ .../fct_student_daily_attendance.yml | 1 + ...fct_student_discipline_actions_summary.sql | 1 + ...fct_student_discipline_actions_summary.yml | 1 + ..._student_discipline_incident_behaviors.sql | 1 + ..._student_discipline_incident_behaviors.yml | 1 + ...ct_student_discipline_incident_summary.sql | 1 + ...ct_student_discipline_incident_summary.yml | 1 + models/core_warehouse/fct_student_grades.sql | 1 + models/core_warehouse/fct_student_grades.yml | 1 + .../fct_student_school_attendance_event.sql | 2 + .../fct_student_school_attendance_event.yml | 1 + .../fct_student_section_attendance_event.sql | 1 + .../fct_student_section_attendance_event.yml | 48 +++++++++++++++++++ 15 files changed, 66 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3e80b82..d374d137 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Unreleased ## New features +- Add `school_year` column to `fct_student_grades`, `fct_student_discipline_incident_behaviors`, `fct_student_discipline_incident_summary`, `fct_student_discipline_actions_summary`, `fct_student_school_attendance_event`, `fct_student_section_attendance_event`, `fct_student_daily_attendance` ## Under the hood +- Expand yml documentation for `fct_student_section_attendance_event` ## Fixes # edu_wh v0.6.0 diff --git a/models/core_warehouse/fct_student_daily_attendance.sql b/models/core_warehouse/fct_student_daily_attendance.sql index 47caea6c..f74ed746 100644 --- a/models/core_warehouse/fct_student_daily_attendance.sql +++ b/models/core_warehouse/fct_student_daily_attendance.sql @@ -93,6 +93,7 @@ stu_enr_att_cal as ( enr.tenant_code, enr.entry_date, attendance_calendar.k_calendar_date, + attendance_calendar.school_year, attendance_calendar.calendar_date, enr.exit_withdraw_date from fct_student_school_assoc as enr @@ -108,6 +109,7 @@ fill_positive_attendance as ( stu_enr_att_cal.k_student_xyear, stu_enr_att_cal.k_school, stu_enr_att_cal.k_calendar_date, + stu_enr_att_cal.school_year, coalesce( fct_student_school_att.k_session, bld_attendance_sessions.k_session @@ -206,6 +208,7 @@ cumulatives as ( excusal_status_streaks.k_student_xyear, excusal_status_streaks.k_school, excusal_status_streaks.k_calendar_date, + excusal_status_streaks.school_year, excusal_status_streaks.calendar_date, excusal_status_streaks.k_session, excusal_status_streaks.tenant_code, diff --git a/models/core_warehouse/fct_student_daily_attendance.yml b/models/core_warehouse/fct_student_daily_attendance.yml index ddfaf720..8801d81b 100644 --- a/models/core_warehouse/fct_student_daily_attendance.yml +++ b/models/core_warehouse/fct_student_daily_attendance.yml @@ -34,6 +34,7 @@ models: - name: k_student - name: k_school - name: k_calendar_date + - name: school_year - name: calendar_date - name: k_session - name: tenant_code diff --git a/models/core_warehouse/fct_student_discipline_actions_summary.sql b/models/core_warehouse/fct_student_discipline_actions_summary.sql index 292c8f9b..2c0d5787 100644 --- a/models/core_warehouse/fct_student_discipline_actions_summary.sql +++ b/models/core_warehouse/fct_student_discipline_actions_summary.sql @@ -57,6 +57,7 @@ formatted as ( fct_student_discipline_actions.k_student_xyear, fct_student_discipline_actions.k_discipline_actions_event, fct_student_discipline_actions.tenant_code, + fct_student_discipline_actions.school_year, behaviors_array.behavior_types_array, behaviors_array.incident_id_array, actions_array.discipline_actions_array, diff --git a/models/core_warehouse/fct_student_discipline_actions_summary.yml b/models/core_warehouse/fct_student_discipline_actions_summary.yml index e0e782fb..857e98ed 100644 --- a/models/core_warehouse/fct_student_discipline_actions_summary.yml +++ b/models/core_warehouse/fct_student_discipline_actions_summary.yml @@ -31,6 +31,7 @@ models: description: > A key containing discipline_action_id and discipline_date to represent a single discipline action event. - name: tenant_code + - name: school_year - name: behavior_types_array description: > An array of behavior types, which are defined as a category of behavior describing the diff --git a/models/core_warehouse/fct_student_discipline_incident_behaviors.sql b/models/core_warehouse/fct_student_discipline_incident_behaviors.sql index 31695073..8ba20ad1 100644 --- a/models/core_warehouse/fct_student_discipline_incident_behaviors.sql +++ b/models/core_warehouse/fct_student_discipline_incident_behaviors.sql @@ -50,6 +50,7 @@ formatted as ( 'lower(stg_stu_discipline_incident_behaviors.behavior_type)'] ) }} as k_student_discipline_incident_behavior, stg_stu_discipline_incident_behaviors.tenant_code, + stg_stu_discipline_incident_behaviors.school_year, stg_stu_discipline_incident_behaviors.school_id, stg_stu_discipline_incident_behaviors.incident_id, stg_stu_discipline_incident_behaviors.behavior_type, diff --git a/models/core_warehouse/fct_student_discipline_incident_behaviors.yml b/models/core_warehouse/fct_student_discipline_incident_behaviors.yml index 42c0ee39..98c25004 100644 --- a/models/core_warehouse/fct_student_discipline_incident_behaviors.yml +++ b/models/core_warehouse/fct_student_discipline_incident_behaviors.yml @@ -27,6 +27,7 @@ models: description: > A key containing incident_id and school_id to represent a single discipline incident. - name: tenant_code + - name: school_year - name: school_id - name: incident_id description: > diff --git a/models/core_warehouse/fct_student_discipline_incident_summary.sql b/models/core_warehouse/fct_student_discipline_incident_summary.sql index f9ecc4d6..aac88837 100644 --- a/models/core_warehouse/fct_student_discipline_incident_summary.sql +++ b/models/core_warehouse/fct_student_discipline_incident_summary.sql @@ -53,6 +53,7 @@ formatted as ( fct_student_discipline_incident_behaviors.k_student_xyear, fct_student_discipline_incident_behaviors.k_discipline_incident, fct_student_discipline_incident_behaviors.tenant_code, + fct_student_discipline_incident_behaviors.school_year, behaviors_array.behavior_types_array, actions_array.discipline_actions_array, -- we want to include the most severe behavior type and discipline action diff --git a/models/core_warehouse/fct_student_discipline_incident_summary.yml b/models/core_warehouse/fct_student_discipline_incident_summary.yml index 309fd0e8..aa880a07 100644 --- a/models/core_warehouse/fct_student_discipline_incident_summary.yml +++ b/models/core_warehouse/fct_student_discipline_incident_summary.yml @@ -31,6 +31,7 @@ models: description: > A key containing discipline_action_id and discipline_date to represent a single discipline event. - name: tenant_code + - name: school_year - name: behavior_types_array description: > An array of behavior types, which are defined as a category of behavior describing the diff --git a/models/core_warehouse/fct_student_grades.sql b/models/core_warehouse/fct_student_grades.sql index 8b3ea75c..1fa441c1 100644 --- a/models/core_warehouse/fct_student_grades.sql +++ b/models/core_warehouse/fct_student_grades.sql @@ -41,6 +41,7 @@ formatted as ( dim_grading_period.k_grading_period, stg_grades.grade_type, stg_grades.tenant_code, + stg_grades.school_year, stg_grades.letter_grade_earned, stg_grades.numeric_grade_earned, stg_grades.diagnostic_statement, diff --git a/models/core_warehouse/fct_student_grades.yml b/models/core_warehouse/fct_student_grades.yml index 43926327..34ae7530 100644 --- a/models/core_warehouse/fct_student_grades.yml +++ b/models/core_warehouse/fct_student_grades.yml @@ -45,6 +45,7 @@ models: The type of grade in a report card or transcript (e.g., Final, Exam, Grading Period). - name: tenant_code + - name: school_year - name: letter_grade_earned - name: numeric_grade_earned - name: diagnostic_statement diff --git a/models/core_warehouse/fct_student_school_attendance_event.sql b/models/core_warehouse/fct_student_school_attendance_event.sql index 89ed0a6b..c6c0b011 100644 --- a/models/core_warehouse/fct_student_school_attendance_event.sql +++ b/models/core_warehouse/fct_student_school_attendance_event.sql @@ -56,6 +56,7 @@ joined as ( dim_calendar_date.calendar_date, dim_session.k_session, stg_stu_sch_attend.tenant_code, + stg_stu_sch_attend.school_year, stg_stu_sch_attend.attendance_event_category, stg_stu_sch_attend.attendance_event_reason, xwalk_att_events.is_absent, @@ -103,6 +104,7 @@ formatted as ( k_calendar_date, k_session, tenant_code, + school_year, calendar_date, attendance_event_category, attendance_event_reason, diff --git a/models/core_warehouse/fct_student_school_attendance_event.yml b/models/core_warehouse/fct_student_school_attendance_event.yml index fcaf7d2f..fe9976c8 100644 --- a/models/core_warehouse/fct_student_school_attendance_event.yml +++ b/models/core_warehouse/fct_student_school_attendance_event.yml @@ -33,6 +33,7 @@ models: - name: calendar_date - name: k_session - name: tenant_code + - name: school_year - name: attendance_event_category - name: attendance_event_reason - name: is_absent diff --git a/models/core_warehouse/fct_student_section_attendance_event.sql b/models/core_warehouse/fct_student_section_attendance_event.sql index bd921f39..b4df4900 100644 --- a/models/core_warehouse/fct_student_section_attendance_event.sql +++ b/models/core_warehouse/fct_student_section_attendance_event.sql @@ -31,6 +31,7 @@ formatted as ( dim_course_section.k_school, dim_course_section.k_course_section, stg_stu_section_attendance.tenant_code, + stg_stu_section_attendance.school_year, stg_stu_section_attendance.attendance_event_date, stg_stu_section_attendance.attendance_event_category, stg_stu_section_attendance.attendance_event_reason, diff --git a/models/core_warehouse/fct_student_section_attendance_event.yml b/models/core_warehouse/fct_student_section_attendance_event.yml index 858ab279..7874ec09 100644 --- a/models/core_warehouse/fct_student_section_attendance_event.yml +++ b/models/core_warehouse/fct_student_section_attendance_event.yml @@ -2,5 +2,53 @@ version: 2 models: - name: fct_student_section_attendance_event + description: > + ##### Overview: + Defines student-section-level attendance events (period/class attendance). + + Since attendance is generally recorded only in the negative, this is + typically a table of absences only. This is more granular than school-level + attendance, tracking attendance at the individual class/section level. + + ##### Primary Key: + `k_student, k_course_section, attendance_event_category, attendance_event_date` + config: tags: ['core'] + tests: + - dbt_utils.unique_combination_of_columns: + arguments: + combination_of_columns: + - k_student + - k_course_section + - attendance_event_category + - attendance_event_date + columns: + - name: k_student + description: Unique identifier for the student. Foreign key reference to dim_student. + - name: k_student_xyear + description: Unique identifier for the student across all years. + - name: k_school + description: Unique identifier for the school. Derived from the course section. + - name: k_course_section + description: Unique identifier for the course section. Foreign key reference to dim_course_section. + - name: tenant_code + - name: school_year + - name: attendance_event_date + description: The date of the attendance event. + - name: attendance_event_category + description: The descriptor value from AttendanceEventCategoryDescriptor. + - name: attendance_event_reason + description: The reason for the attendance event (e.g., reason for absence). + - name: is_absent + description: Indicator for absence. Defined via descriptor mapping in `xwalk_attendance_events`. + - name: event_duration + description: The amount of time for the event as recognized by the school. + - name: section_attendance_duration + description: The duration of the section attendance event. + - name: arrival_time + description: The time of arrival for the student. + - name: departure_time + description: The time of departure for the student. + - name: educational_environment + description: The setting in which a child receives education and related services. From f370cc646942960a4c19f28c56e5c749c0b6194a Mon Sep 17 00:00:00 2001 From: Na Nguyen <134335069+gnguyen87@users.noreply.github.com> Date: Fri, 13 Feb 2026 10:19:10 -0600 Subject: [PATCH 07/11] Bugfix/class period (#214) * add logic to support non-military time records * add doc to changelog * add eval condition --------- Co-authored-by: gnguyen87 --- CHANGELOG.md | 1 + models/core_warehouse/dim_class_period.sql | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d374d137..77d99bdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ## Under the hood - Expand yml documentation for `fct_student_section_attendance_event` ## Fixes +- Fix `period_duration` calculation in `dim_class_period` to account for different time formats. # edu_wh v0.6.0 ## New features diff --git a/models/core_warehouse/dim_class_period.sql b/models/core_warehouse/dim_class_period.sql index a56095c6..6f2ff369 100644 --- a/models/core_warehouse/dim_class_period.sql +++ b/models/core_warehouse/dim_class_period.sql @@ -43,7 +43,10 @@ formatted as ( else meeting_time:endTime::string end end as end_time, - timediff(MINUTE, concat('2020-01-01 ', start_time)::timestamp, concat('2020-01-01 ', end_time)::timestamp) as period_duration + case + when start_time <= end_time then timediff(MINUTE, concat('2020-01-01 ', start_time)::timestamp, concat('2020-01-01 ', end_time)::timestamp) + else timediff(MINUTE, concat('2020-01-01 ', start_time)::timestamp, dateadd(hour, 12 , concat('2020-01-01 ', end_time)::timestamp)) + end as period_duration -- custom indicators {% if custom_data_sources is not none and custom_data_sources | length -%} From 730c52e9a87a9ea33caa6fdfeac3d668b9fe35ec Mon Sep 17 00:00:00 2001 From: Rob Little Date: Fri, 13 Feb 2026 11:46:42 -0600 Subject: [PATCH 08/11] Bump/061 (#216) * Update CHANGELOG.md * Update dbt_project.yml --- CHANGELOG.md | 5 +++++ dbt_project.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77d99bdb..6a497438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Unreleased ## New features +## Under the hood +## Fixes + +# edu_wh v0.6.1 +## New features - Add `school_year` column to `fct_student_grades`, `fct_student_discipline_incident_behaviors`, `fct_student_discipline_incident_summary`, `fct_student_discipline_actions_summary`, `fct_student_school_attendance_event`, `fct_student_section_attendance_event`, `fct_student_daily_attendance` ## Under the hood - Expand yml documentation for `fct_student_section_attendance_event` diff --git a/dbt_project.yml b/dbt_project.yml index bc99310a..550b68c7 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,7 +1,7 @@ config-version: 2 name: 'edu_wh' -version: '0.6.0' +version: '0.6.1' require-dbt-version: [">=1.10.5", "<2.0.0"] # This setting configures which "profile" dbt uses for this project. From 9c4906611b02f697791362fca68e0f5d288d75ca Mon Sep 17 00:00:00 2001 From: Ryan Aguilar Date: Fri, 9 Jan 2026 14:37:33 -0500 Subject: [PATCH 09/11] Add dim_evaluation --- models/tpdm_warehouse/dim_evaluation.sql | 35 ++++++++++++++++++++++++ models/tpdm_warehouse/dim_evaluation.yml | 0 2 files changed, 35 insertions(+) create mode 100644 models/tpdm_warehouse/dim_evaluation.sql create mode 100644 models/tpdm_warehouse/dim_evaluation.yml diff --git a/models/tpdm_warehouse/dim_evaluation.sql b/models/tpdm_warehouse/dim_evaluation.sql new file mode 100644 index 00000000..c082f97d --- /dev/null +++ b/models/tpdm_warehouse/dim_evaluation.sql @@ -0,0 +1,35 @@ +{{ + config( + post_hook=[ + "alter table {{ this }} alter column k_evaluation set not null", + "alter table {{ this }} add primary key (k_evaluation)", + ] + ) +}} + +with stg_eval as ( + select * from {{ ref('stg_tpdm_evaluations') }} +), + +formatted as ( + select + stg_eval.k_evaluation, + stg_eval.tenant_code, + stg_eval.school_year, + stg_eval.ed_org_id, + stg_eval.evaluation_period, + stg_eval.performance_evaluation_title, + stg_eval.performance_evaluation_type, + stg_eval.school_year, + stg_eval.academic_term, + stg_eval.academic_subject, + stg_eval.evaluation_description, + stg_eval.min_rating, + stg_eval.max_rating, + stg_eval.inter_rater_reliability_score, + stg_eval.evaluation_type, + stg_eval.v_rating_levels, + stg_eval.performance_evaluation_reference + from stg_eval +) +select * from formatted \ No newline at end of file diff --git a/models/tpdm_warehouse/dim_evaluation.yml b/models/tpdm_warehouse/dim_evaluation.yml new file mode 100644 index 00000000..e69de29b From a4ecda17a2957dd4725e750787fa993369541191 Mon Sep 17 00:00:00 2001 From: Ryan Aguilar Date: Wed, 25 Mar 2026 16:25:54 -0400 Subject: [PATCH 10/11] Fix stg ref --- models/tpdm_warehouse/dim_evaluation.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/tpdm_warehouse/dim_evaluation.sql b/models/tpdm_warehouse/dim_evaluation.sql index c082f97d..35dc9641 100644 --- a/models/tpdm_warehouse/dim_evaluation.sql +++ b/models/tpdm_warehouse/dim_evaluation.sql @@ -8,7 +8,7 @@ }} with stg_eval as ( - select * from {{ ref('stg_tpdm_evaluations') }} + select * from {{ ref('stg_tpdm__evaluations') }} ), formatted as ( From 1fc560013933a9226a8862e08be78f76e35b2bc6 Mon Sep 17 00:00:00 2001 From: Ryan Aguilar Date: Wed, 25 Mar 2026 17:19:17 -0400 Subject: [PATCH 11/11] Remove academic_subject, duplicate school_year --- models/tpdm_warehouse/dim_evaluation.sql | 2 -- 1 file changed, 2 deletions(-) diff --git a/models/tpdm_warehouse/dim_evaluation.sql b/models/tpdm_warehouse/dim_evaluation.sql index 35dc9641..961ef41b 100644 --- a/models/tpdm_warehouse/dim_evaluation.sql +++ b/models/tpdm_warehouse/dim_evaluation.sql @@ -20,9 +20,7 @@ formatted as ( stg_eval.evaluation_period, stg_eval.performance_evaluation_title, stg_eval.performance_evaluation_type, - stg_eval.school_year, stg_eval.academic_term, - stg_eval.academic_subject, stg_eval.evaluation_description, stg_eval.min_rating, stg_eval.max_rating,