Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Update destination table only if any values changes in the source columns (not using CDC)

Experts,

I am using TOS DI and would like to achieve the below use case. 

Source:table1

ID,Flag

1,A

2,B

 

Run1:

Destination:table1_stg 

1,A

2,E

 

Run2: (no change for existing records but one new record is new)

ID,Flag

1,A

2,E

3,E

 

(**** as per the current job flow, tDBInput->tMap->(1)tDBOutput(insertflow) -> (2)tDBOutput(updateflow). actually the new records goes in insert flow at the same time there old 2 records also goes in updateflow but there is no change)

 

 

Run3: (no change for existing records but one new record is new)

ID,Flag

1,E

2,E

3,E

 

(**** this time all three goes in update flow, yes this is ok)

But Run2 how to stop going the updateflow if there is no change in the source data?

 

0683p000009M9pe.png

 

 

 

Labels (2)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

You need to implement for all CDC logic's like new, update and delete? For new and update create one flow and for delete create separate flow. To update you do look up on key and then you mention the expression for the update output in Tampa like row2.key is not null and row1.column1 not equals to row2.column1. here row1 is main and row2 is look-up.

View solution in original post

8 Replies
manodwhb
Champion II
Champion II

You need to certain two separate flows ,one for new and another one for to update the using one tmap in tmap you need to specify the exact change like I'd from look-up table is not null and flag not equals from look-up you need to enable the expression section.
Anonymous
Not applicable
Author

Dear Mano,

 

thank your info, i have tried the same... the issue is even there is no change in the source data the update flow is updating all the records.

manodwhb
Champion II
Champion II

Then,I believe you have not written enable or disable expression,what expression you have used.
Anonymous
Not applicable
Author

Dear Mano,

Actually i want to achieve what CDC does. can you pls let me the expression i should put based on my source data in my question thread.

manodwhb
Champion II
Champion II

You need to implement for all CDC logic's like new, update and delete? For new and update create one flow and for delete create separate flow. To update you do look up on key and then you mention the expression for the update output in Tampa like row2.key is not null and row1.column1 not equals to row2.column1. here row1 is main and row2 is look-up.
raowaqasakram
Contributor III
Contributor III

But where to set that if the conditions are true then only put the UPDATE operation?

@sen kum​ 

@Manohar B​ 

manodwhb
Champion II
Champion II

@Rao Waqas Akram​ , you need to check the if condition in tmap output section, enable/disable filter section.

raowaqasakram
Contributor III
Contributor III

thanks alot @Manohar B​