Docs/: Update school year description in all prod_wh tables - #261
Open
htymeson wants to merge 5 commits into
Open
Docs/: Update school year description in all prod_wh tables#261htymeson wants to merge 5 commits into
htymeson wants to merge 5 commits into
Conversation
Traced school_year lineage for every core_warehouse model back through edu_edfi_source staging/base models to distinguish four sourcing patterns: plain ODS/api_year passthrough, real Ed-Fi schoolYearTypeReference-family fields, values inherited from student assessment records, and required fields sourced directly from student_academic_records. Also documented school_year on dim_class_period and fct_student_discipline_actions, which previously had no description at all. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
htymeson
marked this pull request as ready for review
July 7, 2026 21:25
Replaces the school_year description text duplicated across 46 core_warehouse yml files with references to four shared docs blocks in models/core_warehouse/docs/school_year_docs.md, so future wording changes only need to happen in one place per sourcing pattern. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Author
|
okay @rlittle08 updated to use docs blocks and adjusted PR description accordingly! I think this is ready for review, lmk if anything needs changing. |
rlittle08
reviewed
Jul 16, 2026
| {% enddocs %} | ||
|
|
||
| {% docs school_year_source_reference %} | ||
| School year specified by Spring year, e.g. the 2021-2022 year would be 2022. Unlike most other tables, `school_year` here reflects a school year reference embedded directly in the source Ed-Fi record, rather than the year of the source ODS pull — so it can differ from the pull year in edge cases (e.g. calendar or schedule data that spans a year boundary). |
Collaborator
There was a problem hiding this comment.
i worry that the 'unlike most other tables' is just adding confusion.. do most users want the verbose explanation of the ODS magic behind the scenes, or do they just want to know it's a school year?
I'm thinking that this detail on school years is a better fit for a supplementary document, than a dbt docs column description
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description & motivation
Motivation
This is a first pass at SafeInsights work to improve existing DBT docs while writing documentation for the SCDE enclave, as documented in #SI-108 (here).
Description
Fill in a description for every
school_yearcolumn inprod_whschema, so that a range of audiences understand boththe sourcing mechanism and format of school_year variables within each table. This involved:
school_yearvariable for each specificcore_whtable based on model lineage, and categorizing those into four main categories ofschool_yeardescriptionschool_yearreference in thecore_warehouse/models, which involved the following changes from existing documentation (note - there are 57 .yml files in there, and 11 validly have noschool_yearcolumn):school_yearwas present in the model but not in the docs (2 files)Breaking changes introduced by this PR:
I reeally doubt these are breaking changes, but will note just in case. I added school_year variable and descriptions to the following yml files:
PR Merge Priority:
Changes to existing files:
Changes to every yml file in the
models/core_warehouse/folder. To help organize, there are four broad categories that were used to update or fill in (for the first time) theschool_yeardescription.Category 1 — ODS Pull (24 files)
Description:
school_year_ods_pulldim_student.yml, dim_learning_standard.yml, dim_parent.yml, dim_program.yml, fct_student_migrant_education_program_associations.yml, fct_student_program_association.yml, fct_student_special_education_program_association.yml, fct_student_title_i_part_a_program_association.yml, fct_student_homeless_program_association.yml, fct_student_school_food_service_program_associations.yml, fct_student_language_instruction_program_association.yml, fct_student_cte_program_associations.yml, fct_student_subgroup.yml, fct_student_parent_association.yml, dim_course.yml, dim_graduation_plan.yml, dim_cohort.yml, fct_student_cohort_association.yml, dim_discipline_incident.yml, fct_student_discipline_incident_behaviors.yml, fct_student_discipline_incident_summary.yml, fct_student_discipline_actions.yml, fct_student_discipline_actions_summary.yml, dim_class_period.yml
Category 2
Version A: School Year Source Reference, no fallback (12 files)
Description:
school_year_source_referencefct_student_school_attendance_event.yml, fct_student_section_association.yml, fct_student_section_attendance_event.yml, fct_staff_section_association.yml, dim_school_calendar.yml, dim_calendar_date.yml, dim_course_section.yml, dim_session.yml, dim_grading_period.yml, fct_student_grades.yml, fct_student_daily_attendance.yml, msr_student_cumulative_attendance.yml
Version B: School Year Source Reference, with fallback (2 files, unique text each)
fct_staff_school_association.yml:
Description:
school_year_source_reference+ "If that reference is missing, school_year falls back to the source ODS pull year."fct_student_school_association.yml:
Description:
school_year_source_reference+ "If that reference is missing, school_year falls back to a value inferred from entry_date using a school-year cutoff date that can vary by implementation."Category 3 — Assessment-derived (4 files, identical text)
Description:
school_year_assessmentfct_student_assessment.yml, dim_assessment.yml, dim_objective_assessment.yml, fct_student_objective_assessment.yml
Category 4 — Academic Record, Required source field (4 files)
Description:
school_year_academic_recordfct_student_academic_record.yml, fct_student_diploma.yml, fct_student_gpa.yml, fct_course_transcripts.yml
Changes of particular note
The following files had prior descriptions that were unusual:
school_yearback to theapi_yearin raw edfi models (graduation_school_yearis different, though).New files created:
Added a new sub-folder in
/models/core_warehouse/calleddocs/.Within that new sub-folder, added a new file
school_year_docs.mdcontaining the doc blocks definitions for the four categories of school year descriptions.Tests and QC done:
NOTE: I used Claude Code to do the majority of the categorization and lineage mapping, so that likely merits extra review on that alone.
edu_wh PR Review Checklist:
Make sure the following have been completed before approving this PR:
## New Featuresfor features, etc.Important
Questions
school_yearfrom administration date for test-related tables (and entry date in student-school assocation) optional for implementations? If so, I will update language to note optional configuration.