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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
anna_t1
Contributor III
Contributor III

TMap: how to perform lookup with composite key and insert based on that complex key

I have a simple table and I want to insert if:

1) a certain id doesn't exist

2) if that id exists, but one+ of the 3 remaining fields are different

How can I achieve this logic with tMap? I spent too much time around this and with many possibilities, but either I get all with "Y" flag for insert, or I just "Y" for insert when a new id is not there. Am I missing something? I can't find any example for this. Note: No updated is needed, just insert when (c1,c2,c3,c4) is not on target.

0695b00000EYm8MAAT.png

Labels (5)
2 Replies
ThWabi
Creator II
Creator II

Hello anna_t,

 

I suggest using an Inner Join on the input side on the left. On the output side, the first output panel is an Inner Join Reject, the second one is for catching those rows where the other fields differ.

 

Best Regards,

 

Thomas

 

gjeremy1617088143

Hi, you could achieve this in two time, first : inner join with the first id and get the result of the inner join, second : inner join with the three values and get the reject of the inner join.

Send me Love and Kudos