Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
ankit7359
Creator II
Creator II

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

Labels (2)
1 Solution

Accepted Solutions
akumar2301
Specialist II
Specialist II

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

View solution in original post

2 Replies
akumar2301
Specialist II
Specialist II

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