Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adhoc/add section info #285

Merged
merged 4 commits into from
Feb 7, 2025
Merged

Adhoc/add section info #285

merged 4 commits into from
Feb 7, 2025

Conversation

allison-code-dot-org
Copy link
Collaborator

@allison-code-dot-org allison-code-dot-org commented Feb 5, 2025

this PR adds the section/teacher/school/district associated with the student in the school year of their activity. This will duplicate records for every section the student is in in a given school year for every day of activity. Since the model already requires a count distinct on almost every aggregation one would make, we anticipate the risk of overcounting to be low, and a risk we think is worth the associated simplicity of adding the ids to a single model.

Another risk to consider is the number of rows this addition would be adding to dim_active_students. Before the addition, here are the row counts by school year:

2019-20 | 63707364
2020-21 | 72704669
2021-22 | 78850475
2022-23 | 77495252
2023-24 | 77697216
2024-25 | 31403006

After the addition of section_id:

2019-20 | 69489948 (9% increase)
2020-21 | 79677993 (9.5% increase)
2021-22 | 86568860 (9.8% increase)
2022-23 | 85426341 (10.2% increase)
2023-24 | 85116388 (9.5% increase)
2024-25 | 33936091 (8% increase)

The other solution proposed was a separate model on the school_year/student_id/ section_id grain, which would not have the daily duplication that this solution would have. However, many use cases for counting up active students (e.g. district team wanting to count active students by month among enrolled districts) would not be able to be served by this solution.

@allison-code-dot-org allison-code-dot-org merged commit e6fa85e into main Feb 7, 2025
1 check was pending
@allison-code-dot-org allison-code-dot-org deleted the adhoc/add_section_info branch February 7, 2025 17:40
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.

2 participants