Add core warehouse models for Ed-Fi Survey Domain - #262
Draft
gfitzgerald-ea wants to merge 1 commit into
Draft
Conversation
Introduces the initial survey domain star schema per the Q2.26 Survey Domain Models tech spec: - dim_survey, dim_survey_question, dim_survey_question_response_choice - fct_survey_response, fct_survey_question_response, fct_survey_question_response_value (finest grain) Respondent identity is carried via direct respondent keys on the facts (k_student, k_staff, k_parent) with a derived respondent_type, avoiding a separate respondent dimension. Multi-select delimited-text parsing is not implemented in this initial version. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Initial core warehouse star schema for the Ed-Fi Survey Domain, per the Q2.26 Survey Domain Models tech spec. Supports the SC School Climate Survey (Resonant) work.
Dimensions
dim_survey— survey definitions and metadatadim_survey_question— question definitionsdim_survey_question_response_choice— available response choices (kept as a separate entity; joins to response values only under specific circumstances, per the spec's "variable join key" note)Facts (three grains, coarsest → finest)
fct_survey_response— 1 submitted survey responsefct_survey_question_response— 1 response to 1 questionfct_survey_question_response_value— 1 selected/entered value per question responseDesign notes
k_student,k_staff,k_parent) with a derivedrespondent_type, rather than a separate respondent dimension — matches the spec and avoids snowflaking.respondent_typeis derived from the staging keys, not from join success.dim_contact; this package uses the existingdim_parent(k_parent) instead, for consistency with the rest ofedu_wh. The stagingk_contactcolumn is aliased tok_parentinfct_survey_response.Tutoring;Counseling;Mentoring→ one row per value) is not implemented in this initial version — flagged as an open decision in the spec.left joins so orphaned rows surface vianot_null/PK constraints instead of being silently dropped.Open questions / follow-ups
🤖 Generated with Claude Code