Multi Sector support in Assessment Analytics#5347
Merged
Conversation
itsmostafa
approved these changes
Feb 5, 2026
jekuipers
approved these changes
Feb 5, 2026
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.
This pull request introduces significant enhancements to how sector and industry data are managed and reported for assessments. The main change is the migration of sector and subsector (industry) information from the
DETAILS_DEMOGRAPHICStable to a new dedicated table,ASSESSMENT_SECTOR_SUBSECTOR. This update includes a database schema change, a data migration script, supporting backend logic, and a new API endpoint to retrieve sector sample sizes for analytics. Additional minor refactoring and copyright headers are also included.Database migration and schema changes:
ASSESSMENT_SECTOR_SUBSECTOR, to store sector and industry information for assessments, with appropriate primary and foreign key constraints.ConvertDatabase12405) that migrates existing sector and subsector data fromDETAILS_DEMOGRAPHICSto the new table, and removes the old records. [1] [2]Backend business logic and API updates:
GetSectorsAndSampleSizesmethod toAnalyticsBusiness, which aggregates sector sample sizes for a given assessment using the new data structure.SectorsAndSamplesmodel to represent sector/sample size pairs for analytics./api/analytics/samplesizes) inAnalyticsControllerto expose sector sample size data, and updated controller dependencies accordingly. [1] [2] [3]Refactoring and minor changes:
AnalyticsController. [1] [2] [3] [4]🗣 Description
💭 Motivation and context
🧪 Testing
✅ Pre-approval checklist
bump_versionscript if this repository is versioned and the changes in this PR warrant a version bump.✅ Pre-merge checklist
✅ Post-merge checklist