SCD3 implementation with more than two level of history

Five 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

 

 

 

 


Accepted Solutions
Nine Stars

Re: SCD3 implementation with more than two level of history

Please find the attached document for job flow and results. Regards,
Veeru Boppudi

All Replies
Nine Stars

Re: SCD3 implementation with more than two level of history

Please find the attached document for job flow and results. Regards,
Veeru Boppudi
Five 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 

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog