I work for a finance company. We need to track exact value dimensions at the time of the transaction. We try to load data incrementally into the warehouse ~ 15 mins, and in this period, we could see a dimension with the exact business key change multiple times (multiple records are collected). Usually, we write scripts to pick the latest of all the changes in 15 min window. But in our case, I want all those changes to be loaded into dimension table. How can this be implemented?
EDIT:
Examples in same Batch:
Business Key, Name, email (scd 2), Created_at
1, xyz, xyz@gmail.com, 1/1/21 10:00 AM
1, xyz, abc@gmail.com, 1/1/21 10:05 AM
Expected changes in dimension
SK, BK, Name, Email, Effective_date, Expiration_date, Current
1, 1, efg@gmail.com, 01/01/1900 0:00 AM, 1/1/21 9:59 AM, N
--- New changes from batch ------
2, 1, xyz@gmail.com, 01/01/2021 10:00 AM, 01/01/2021 10:05 AM, N
3, 1, abc@gmail.com, 01/01/2021 10:05 AM, 12/31/9999 00:00 AM, Y