Skip to content

Add core warehouse models for Ed-Fi Survey Domain - #262

Draft
gfitzgerald-ea wants to merge 1 commit into
mainfrom
feature/core_survey_models
Draft

Add core warehouse models for Ed-Fi Survey Domain#262
gfitzgerald-ea wants to merge 1 commit into
mainfrom
feature/core_survey_models

Conversation

@gfitzgerald-ea

Copy link
Copy Markdown

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 metadata
  • dim_survey_question — question definitions
  • dim_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 response
  • fct_survey_question_response — 1 response to 1 question
  • fct_survey_question_response_value — 1 selected/entered value per question response

Design notes

  • Respondent identity uses direct respondent keys on the facts (k_student, k_staff, k_parent) with a derived respondent_type, rather than a separate respondent dimension — matches the spec and avoids snowflaking. respondent_type is derived from the staging keys, not from join success.
  • The spec references dim_contact; this package uses the existing dim_parent (k_parent) instead, for consistency with the rest of edu_wh. The staging k_contact column is aliased to k_parent in fct_survey_response.
  • Multi-select delimited-text parsing (e.g. Tutoring;Counseling;Mentoring → one row per value) is not implemented in this initial version — flagged as an open decision in the spec.
  • Respondent-key joins are explicit left joins so orphaned rows surface via not_null/PK constraints instead of being silently dropped.

Open questions / follow-ups

  • Whether to build delimited multi-select parsing (and how to configure delimiters per integration).
  • Participation-rate denominators (survey eligibility) are out of scope until source data is available.

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant