Skip to content

Conversation

@ghukill
Copy link
Contributor

@ghukill ghukill commented Sep 4, 2025

Purpose and background context

Why these changes are being introduced:

A recently added integrity test triggered for the Employee Salary History table, 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 History table will be truncated + repopulated (as we have done for other merge field changes)

What are the relevant tickets?

Why these changes are being introduced:

A recently added integrity alert triggered for the 'Employee Salary
History' table, 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, that 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, and is the
only time we might get multiple values for a single person, on a single day,
for a single appointment.  Similarly, we already skip "Supplemental Pay" for
this reason.

Side effects of this change:
* Improve merge field values, reduce stale data in Salary History table.

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/IN-1450
@ghukill ghukill marked this pull request as ready for review September 4, 2025 15:20
@jonavellecuerdo jonavellecuerdo self-assigned this Sep 4, 2025
@ehanson8 ehanson8 self-assigned this Sep 4, 2025
@ghukill ghukill merged commit fa30160 into main Sep 4, 2025
3 checks passed
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.

4 participants