Feature/sedm clean#244
Conversation
| +schema: wh | ||
| sedm_warehouse: | ||
| +schema: wh | ||
| +enabled: "{{ var('edu:sedm:enabled', False) }}" |
There was a problem hiding this comment.
@rlittle08 I see that there is an existsing special education tag edu:special_ed. However, these new models are only available with the new SEDM Ed-Fi extension, so I'm not sure if I should use this new name and make a note about this distinction somewhere, or if these new models should fall under the existing variable.
rlittle08
left a comment
There was a problem hiding this comment.
this is in good shape, but left some naming suggestions, picky things, and an important q about the disability resource
| stage.tenant_code, | ||
| stage.school_year, | ||
| stage.idea_event_id, | ||
| stage.ed_org_id, |
There was a problem hiding this comment.
back in stage, can you add edorg_ref(), so we can get k_lea and k_school in the fct here?
There was a problem hiding this comment.
because student is part of the grain, can you rename here to fct_student_idea_event? base/stg can stay the same to follow practice of those models exactly matching the ed-fi resource
| tags: ['sedm'] | ||
| enabled: "{{ var('edu:sedm:enabled', False) }}" | ||
|
|
||
| constraints: |
There was a problem hiding this comment.
thanks for including these!
| stage.idea_event_id, | ||
| stage.ed_org_id, | ||
| stage.ed_org_type, | ||
| stage.idea_event, |
There was a problem hiding this comment.
back in base/stg, I think we should rename this to idea_event_type, to follow our typical practice. There are exceptions, but i think this is a case where type is important info - this is capturing the type/category of event, right?
| - name: idea_event_id | ||
| - name: ed_org_id | ||
| - name: ed_org_type | ||
| - name: idea_event |
There was a problem hiding this comment.
can you fill in these idea-specific fields, using the data handbook descriptions?
| stage.special_education_hours_per_week | ||
| {{ edu_edfi_source.extract_extension(model_name='stg_sedm__student_ieps', flatten=False) }} | ||
| from stage | ||
| inner join dim_student |
There was a problem hiding this comment.
picky, we generally just do join not inner join, and don't indent this way
| - name: student_iep_association_id | ||
| - name: ed_org_id | ||
| - name: ed_org_type | ||
| - name: iep_finalized_date |
There was a problem hiding this comment.
can you please add descriptions to these by copying from ed-fi handbook?
| dim_student.k_student_xyear, | ||
| stage.tenant_code, | ||
| stage.school_year, | ||
| stage.student_iep_association_id, |
There was a problem hiding this comment.
see my comment on upstream pr about this col - the ed-fi docs call it by a different name?
| }} | ||
|
|
||
| with disabilities as ( | ||
| select * from {{ ref('stg_sedm__student_iep_disability_collections') }} |
There was a problem hiding this comment.
see my comment on upstream pr - is this resource available in 6.1 data model? or has it moved to being a collection on studentIEP?
There was a problem hiding this comment.
depending on your response, I may think about whether this should have its own fct model vs. be included in fct_student_iep
There was a problem hiding this comment.
i'm leaning toward a rename of fct_student_iep_association - thoughts?
feature/sedm: Add SEDM warehouse facts for student IEPs, IDEA events, and IEP disability lines
Description & motivation
This PR adds warehouse dbt models for the SEDM (Special Education Data Model) extension so analysts can use SEDM IEP and IDEA event data alongside existing core special-ed facts. Staging for these resources lives in
edu_edfi_source(stg_sedm__student_ieps,stg_sedm__idea_events,stg_sedm__student_iep_disability_collections); this work materializes the corresponding facts inedu_whundermodels/sedm_warehouse/, with inner joins todim_studentsok_studentandk_student_xyearmatch the warehouse student dimension (same pattern as other student-centric facts).Motivation: to support local education agencies' ability to support students with IEPs and facilitate mandated reporting requirements.
Breaking changes introduced by this PR:
edu:sedm:enabled(defaultFalse) viadbt_project.ymlonce those configs are committed.PR Merge Priority:
Changes to existing files:
CHANGELOG entry under
## New Features.New files created:
models/sedm_warehouse/fct_student_iep.sql: One row per student IEP fromstg_sedm__student_ieps, keyed byk_student_iep. Resolvesk_student/k_student_xyearfromdim_studentfor referential integrity. Surrogate extension columns come fromedu_edfi_source.extract_extensionforstg_sedm__student_ieps. Post-hooks enforce PK onk_student_iepand NOT NULL onk_student_iep,k_student,k_student_xyear, plus an FK fromk_studenttodim_student.models/sedm_warehouse/fct_idea_event.sql: One row per IDEA event fromstg_sedm__idea_events, keyed byk_idea_event, with the samedim_studentjoin and extension extraction pattern. Post-hooks: PK onk_idea_event, NOT NULL on key columns, FK todim_student.models/sedm_warehouse/fct_student_iep_disability.sql: Long-format rows for disabilities on an IEP fromstg_sedm__student_iep_disability_collections, keyed by staging’sk_student_iep(and related descriptors / order). Post-hook adds an FK fromk_student_ieptofct_student_iep.Follow-ups (recommended before or right after merge, if not already on the branch):
sedm_warehousefolder config indbt_project.yml(schemawh, enable viaedu:sedm:enabled).Tests and QC done:
Submitter checklist
Make sure the following have been completed before approving this PR:
## New Featuresfor features, etc.edu_wh PR Review Checklist:
Make sure the following have been completed before approving this PR:
## New Featuresfor features, etc.