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: 
Anonymous
Not applicable

tMap - trying to catch matches, in A but not B and in B but not in A

Hi everyone,

I hope someone can help me with this. I have to tables, my main one is the MC table (A) and the lookup is the new_day table (B). There are three scenarios I want to catch:
1) Both the keys for (A) and (B) match. This is working via tLogRow1. I will then take the variable MC and concatenate a "1" to the existing string (to show that this string was also found in the new day table).
2) The key is in (A) but is not found in (B). This is working via catching the "Catch lookup inner join reject" for tLogRow2. I will then take the variable MC and concatenate a "0" to the existing string (to show that this string was NOT found in the new day table).
3) The key isn't in (A) but is found in (B). This indicates a new key coming from the new day table. I've tried to get this to work via the "Catch Output Reject" but I end up with 0 records, no matter what I try. There are more records in (B) than in (A) so there must be some new keys to catch.
Attached are the screenshots of the detailed tMap and the workflow.

I've tried to enter an expression for tLogRow1 but all I managed was that all of a sudden it didn't get any record anymore, though I entered "mc.A_PARTY == new_day.A_PARTY" for it. It must be something simple that I probably overlook. I use inner join and unique match BTW.

Thanks in advance,

Andreas

Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi Andreas,
Would you mind elaborating your case with an example with input and expected output values?(expected output for your three scenarios)
"Catch Output Reject" is used to define the table as a standard reject output flow to gather the records that do not include in "Match" output.
Have you already checked component reference with related scenarions :TalendHelpCenter:tMap?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Andreas,
Would you mind elaborating your case with an example with input and expected output values?(expected output for your three scenarios)
"Catch Output Reject" is used to define the table as a standard reject output flow to gather the records that do not include in "Match" output.
Have you already checked component reference with related scenarions :TalendHelpCenter:tMap?
Best regards
Sabrina
Anonymous
Not applicable
Author

Scenario 3 will not work I am afraid. The process is driven by the "Main" data. If the key is not in the "Main" data, it will never be checked at all. It may exist in the "Lookup" but will be ignored as the data driving the flow is from "Main". In order to achieve your goal you could use another tMap and switch your "Main" and "Lookup". This would work but doing that would be somewhat inefficient if you are going to be re-checking every row. Another alternative might be to create a new driving data source ("Main") containing the IDs from both sources with a key to identify which source the ID is from. Then have you current "Main" and "Lookup" inputs as "Lookup" inputs for this new "Main".