cancel
Showing results for 
Search instead for 
Did you mean: 

How to Implement Update in Diff Snap

rpathak
New Contributor II

Hi,

Using diff I am able to insert new records in the table, but for an update, it is not working either it will update all the records with the latest record or insert the new record without checking.

please help me to find the exact error. Mentioned below is the pipeline for your reference.

image

first time result only for insert is correct:-
image

for Update wrong:-
image

diff and Update snap details:-
image

image

1 ACCEPTED SOLUTION

del
Contributor III

Hi @rpathak,

For your update snap, you will need to include a record identifier condition in the Update Condition field. Otherwise, for every input record, it updates all the records in the table matching the UPDTD_TS>=getdate()-2 condition.

So you might change your current Update Condition to something like:
COUPON_ID = $COUPON_ID and UPDTD_TS>=getdate()-2

View solution in original post

2 REPLIES 2

del
Contributor III

Hi @rpathak,

For your update snap, you will need to include a record identifier condition in the Update Condition field. Otherwise, for every input record, it updates all the records in the table matching the UPDTD_TS>=getdate()-2 condition.

So you might change your current Update Condition to something like:
COUPON_ID = $COUPON_ID and UPDTD_TS>=getdate()-2

rpathak
New Contributor II

Hi @del,

Thank you for the reply. The issue has been resolved using your given suggestion.

Regards
Ratnakar