Friday, 30 July 2021

SCD2 Implementation in Abinitio-

We can implement SCD2 using the below scenario in abinitio:-

1. Take 2 tables as your input first would be your today's file that is in0 second be your previous file that would be in1.

2. Take the inner join of both the tables on the matching key say cust_id, and in the outport of the DML make it embedded and do the naming convention by adding the suffix _new for today's file and _old for the prev day file data records so to make it easier to understand the data fields.

3. In the join components, unused 0 will give you inserted records(that would come from today's file), and unused 1(that would come from yesterday's file) will give you deleted records.

4. Take a reformat connecting the join output port and check:

if ( _new != _old) (these are the suffix we have given in the DML output port coming from the join component), force error it from the reject port of reformat those will be your updated records and you will get the unchanged records from the output port of reformat.

5. combine all the inserted records from joining unused 0, updated records from rejecting port of reformat, and unchanged records from outport of reformat and load all of them into the delta table. 





No comments:

Post a Comment

how to create dml dynamically in Ab-initio

 $[ begin let int i = 0; let string(int) complete_list = "emp_nm,billable,age,designation,location"; let string(int) file_content ...