SCD Type - 2 without use of inbuilt components

Eight Stars

SCD Type - 2 without use of inbuilt components

Hi,

Jus as the earlier post, i m trying scd -2 .

Source Table - dim_emp

emp_id,emp_name,emp_location

1,abc,london

2,def,boston

Target Table - tgt_dim_emp

emp_id,emp_name,emp_location,version

1,abc,london,1

2,def,boston,1

2,def,seattle,2

As per SCD - 2, the records have to be compared and the updated record must be inserted or updated.

Can anyone help me...how do i achieve in 3 formats - versioning,flagging,effective date

While trying for versioning... i have tried the following approach...

source table ---> tmap ---> target table(inserting all the values in the target table with version as 1).

onsubjobok

source table --->             tmap(In Tmap,how do i compare all the values of the table and how do insert the new record)----> target_table

target table(lookup) ---->

Pls do help.

An early repsonse would be appreciated.

Thanks,Ankit

Seven Stars

Re: SCD Type - 2 without use of inbuilt components

You could compare each field in Variable expression one by one . If all value not same , output two flows

1) update flow - lookup details with end date and is-active as N
2) insert flow- main flow details with version = version + 1 , effective date as current date time and is-active as Y
Regards
Abhishek KUMAR
( Please mark the post as resolved if you found your solution )
Thirteen Stars

Re: SCD Type - 2 without use of inbuilt components

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.