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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
NIKISUBHADIP
Contributor II
Contributor II

SCD type 2 without using talend SCD component

Use case:

1)Compare the source file  data with the dimension table data.

2)Identify the changing column .and key column.

3)Load the dimension table data into a staging file.
4)Inner join the two set of data then.:

 

0683p000009M8Z8.jpg0683p000009M8Ke.jpg

       a)Catch inner join reject and get the new records for insert  operation..

       b)Identify the no change records by comparing two data sets.

       c)Update the active flag to "N"  and end date to current day date for an changed records(by comparing the changing columns from two data sets).

       d)Insert a row for the changed records with active flag as "Y" ,Start Date as current day date . and end date as any default date "31-12-9999".

       

       Note:

     1.insert_new_rec(tfileoutputdelimited) and insert_new_row_fr_changed_rec (tfileoutputdelimited) are in append mode to create a consolidated file for insert operation.

     2. tjava_1 Code : context.setProperty("datestamp", TalendDate.getDate("dd-MM-yyyy").toString());  The highlighted context is used in insert_new_rec(tfileoutputdelimited) and insert_new_row_fr_chnaged_rec (tfileoutputdelimited) to have the file name same.

   0683p000009M8eB.jpg

Labels (2)
2 Replies
lucky0691
Contributor
Contributor

could you please share screenshot of rules applied in tmap

NIKISUBHADIP
Contributor II
Contributor II
Author

Please find the rules screenshot and explanation below:

 

Location column is identified as changing column.

 

0683p000009M8gl.jpg0683p000009M8gq.jpg0683p000009M8gv.jpg