Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.:
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.
could you please share screenshot of rules applied in tmap
Please find the rules screenshot and explanation below:
Location column is identified as changing column.