Add student's birth country to dim_student#178
Conversation
|
Ope, I'm noticing that a number of lines in the changed files are showing updates from trimming trailing whitespace (probably from my vscode settings). Let me know if that should be reverted. |
no problem, we can leave. We have on the backlog a task to look into SQL linters to standardize whitespace etc |
|
@jabortell all looks great. Note, if implementations want to replace the codes with full names, they can use EDU's built-in functionality to replace descriptor code values with long/short descriptions. Once configured, the code in |
Description & motivation
This PR is part of our work to keep the data model up to date. Currently we're already extracting/setting
stg_ef3__students.birth_countryin theedu_edfi_sourcepackage. Now, we're passing this column tobld_ef3__immutable_stu_demos, then upstream todim_student.As part of the
bld_ef3__immutable_stu_demosmodel, whetherbirth_countryhas the grain tenant+student+year or tenant+student is determined by the configuration variableedu:stu_demos:make_demos_immutable, along with related demographics such asbirth_date.Ed-Fi recommends that SIS' populate birth country with only ISO 3166 2-letter country codes. See the entry in the data handbook here. Our added column
birth_countryis just a pass-through -- analysts should double-check that country values are consistent.Breaking changes introduced by this PR:
birth_countrywill be available in three models:stg_ef3__studentsfrom theedu_edfi_sourcepackagebld_ef3__immutable_stu_demosdim_studentFolks should review any queries that select from the changed models to ensure that
birth_countrywill not be selected multiple times.PR Merge Priority:
Changes to existing files:
bld_ef3__immutable_stu_demos: Added columnbirth_countryfromstg_ef3__students.birth_countrydim_student: Added columnbirth_countryfrombld_ef3__immutable_stu_demos.birth_countryNew files created:
No new files created.
Tests and QC done:
dim_student.birth_countrywas mostly populated and with the ISO 2-letter country codes.edu_wh PR Review Checklist:
Make sure the following have been completed before approving this PR:
## New Featuresfor features, etc.