I have a scenario in which we will need to create history of a given record(based on some key) of the change of the status code:-
Input:-
key,status_cd,change_dt
1,C,2012-05-25
1,D,2012-05-29
Output:-
Key,status_cd,change_dt,effect_dt
1,C,2012-05-28,2012-05-25
1,D,9999-12-31,2012-05-29
Problem is there is no refernce history available, all the records are coming in a single input file and I have to generate change_dt and effect_dt for a given status_cd as shown in example.
Any thoughts on how it can be done using SCD stage?
Creating History records using SCD stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 50
- Joined: Tue Jan 19, 2010 4:14 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 50
- Joined: Tue Jan 19, 2010 4:14 am