add logic to allow separate var including students who exit on frist day#246
Open
rlittle08 wants to merge 1 commit into
Open
add logic to allow separate var including students who exit on frist day#246rlittle08 wants to merge 1 commit into
rlittle08 wants to merge 1 commit into
Conversation
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
New config:
edu:enroll:first_day_exit_date_inclusiveBackground
Two existing vars interact when filtering out students who never really attended:
edu:enroll:exclude_exit_before_first_day(default:True) — drops enrollments where the student exited before the first school dayedu:enroll:exit_withdraw_date_inclusive(default:True) — controls whether exit dates are treated as inclusive (<=) or exclusive (<) throughout enrollment logicWhen an implementation sets
exit_withdraw_date_inclusive: False, the first-day exit check inherits that exclusivity — meaning a student who exited on the first day of school is treated the same as one who exited the day before and gets dropped.The problem
TrueFalseTrueFalseTrueFalseImplementations using exclusive exit dates lose first-day attendees even though that's not the intent of the filter.
The fix
A new var
edu:enroll:first_day_exit_date_inclusivecontrols inclusivity for only the first-day exit check. It defaults to whateverexit_withdraw_date_inclusiveis set to (preserving existing behavior), but can be set independently.True(default)True)FalseFalse)FalseTrueUsage
Implementations that use exclusive exit dates but want to retain students who exited on the first day can add to
dbt_project.yml:Breaking changes introduced by this PR:
None
PR Merge Priority:
Changes to existing files:
New files created:
Tests and QC done:
Ran in SC, did quick check --
Needs deeper QC on wider warehouse impacts
edu_wh PR Review Checklist:
Make sure the following have been completed before approving this PR:
## New Featuresfor features, etc.