SCD TYPE2 Implementation
Posted: Thu Jul 16, 2009 7:11 am
Hi,
I have scenario in which i need to develop a SCD type2.Here i have table in which colums are as follows:-
SGTKE(PK),PARTY_ID,SEG_ID,R_ID,MANAGER_NAME,START_DATE,END_DATE
1,1,111,2,A,2009-07-10,NULL
2,6,123,B,2009-07-10,NULL
3,5,078,C,009-07-10,NULL
Now i need to capture the new records basced on PARTY_ID,i.e For a given PARTY_ID(lets say 111),if any other columns changes like
SEG_ID=2
R_ID=4
MANAGER_NAME=E
then i want to capture this new record and my table will be like this:-
SGTKE(PK),PARTY_ID,SEG_ID,R_ID,MANAGER_NAME,START_DATE,END_DATE
1,1,111,2,A,2009-07-10,2009-07-16
2,6,123,B,2009-07-10,NULL
3,5,078,C,009-07-10,NULL
4,1,111,2,4,E,2009-07-16,NULL
for this i am first i am using Change Capture staeg .Here i m considering PARTY_ID as KEY column and change_mode=Explicit keys,all values assuming my values will be
SEG_ID,R_ID,MANAGER_NAME
IS my approch correct..? If i am wrong at any place pelase correct me.
thanks
I have scenario in which i need to develop a SCD type2.Here i have table in which colums are as follows:-
SGTKE(PK),PARTY_ID,SEG_ID,R_ID,MANAGER_NAME,START_DATE,END_DATE
1,1,111,2,A,2009-07-10,NULL
2,6,123,B,2009-07-10,NULL
3,5,078,C,009-07-10,NULL
Now i need to capture the new records basced on PARTY_ID,i.e For a given PARTY_ID(lets say 111),if any other columns changes like
SEG_ID=2
R_ID=4
MANAGER_NAME=E
then i want to capture this new record and my table will be like this:-
SGTKE(PK),PARTY_ID,SEG_ID,R_ID,MANAGER_NAME,START_DATE,END_DATE
1,1,111,2,A,2009-07-10,2009-07-16
2,6,123,B,2009-07-10,NULL
3,5,078,C,009-07-10,NULL
4,1,111,2,4,E,2009-07-16,NULL
for this i am first i am using Change Capture staeg .Here i m considering PARTY_ID as KEY column and change_mode=Explicit keys,all values assuming my values will be
SEG_ID,R_ID,MANAGER_NAME
IS my approch correct..? If i am wrong at any place pelase correct me.
thanks