Commit a8515a8
committed
Refine logic for Employee Salary History unique key
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-14501 parent 9755a14 commit a8515a8
3 files changed
Lines changed: 2 additions & 4 deletions
File tree
- hrqb/tasks
- sql
- tests/tasks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
| |||
0 commit comments