Four Stars

SCD3 implementation with more than two level of history

Hi everyone

I'm new to talend and new to the community.I want to capture the history of particular attributes something like we do SCD type3, but with more than a single level of history. please help me with your expertise how can I achieve it with talend.

I've data something like this

id, Region,State

1250 ,South,TN
1251 ,East,WB
1252 ,South,AP

 

and I want store history like below

id, Current_Region,previous_lvl1_Region,previous_lvl2_Region,previous_lvl3_Region,Current_State,previous_lvl1_State,previous_lvl2_State,previous_lvl3_State

1250 ,South,null,null,TN,null,null

 after first change  it must look like this (change are region = East )

1250 ,East,South,Null,TN,Null,Null

after second change it must look like this (change are region = North and state=HR)

1250 North,East,South,HR,TN,Null

 

 

 

 

  • Data Integration
1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: SCD3 implementation with more than two level of history

Please find the attached document for job flow and results. Regards,
Veeranjaneyulu Boppudi
2 REPLIES
Six Stars

Re: SCD3 implementation with more than two level of history

Please find the attached document for job flow and results. Regards,
Veeranjaneyulu Boppudi
Four Stars

Re: SCD3 implementation with more than two level of history

Thanks Sir, for such a quick reply and it's almost what I needed but you don't considered the when only state may be changed not the region and it have to store the history just for the state and region should be null as region is not changed so no value will be entered in previous_lvl1_region