IN 1450 - Refine logic for Employee Salary History unique key #209
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.
Purpose and background context
Why these changes are being introduced:
A recently added integrity test triggered for the
Employee Salary Historytable, indicating we had a row in Quickbase that no longer aligned with data warehouse data. As has happened before, it appears to be shifting data warehouse values, this time for "End Date" and reason and type data, which then modifies the unique key. When the unique key changes, we get stale data in Quickbase because we are adding rows instead of updating them.How this addresses that need:
After some analysis, and discussion with HR, it was determined we could remove some fields from the unique key logic which keeps it consistent between data warehouse changes. Part of this work was also skipping any salary history with a reason of
"Lump Sum"which has only showed up once across all employess / all time. By removing that, the combination of(MIT ID, Position ID, Start Date)is unique across all salary history rows for all employees. Similarly, we already skip "Supplemental Pay" for this reason.In summary, this PR is very similar to past PRs where we needed to refine the merge field / unique key for a table when new data types and patterns were encountered from data warehouse data. In almost all cases, it has required removing "end dates" (broadly speaking) so that when the "end date" of something changes, it does not modify the calculation of the unique key.
Includes new or updated dependencies?
NO
Changes expectations for external applications?
YES: the
Employee Salary Historytable will be truncated + repopulated (as we have done for other merge field changes)What are the relevant tickets?