Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
can anybody explain me why talend design the Match Model as it is?
First - There is an option "First match" which matches the first record of the lookup table. All fine, easy to understand for me and works as it sounds.
Second - The option "All matches" matches all records with the same key, it is also is fine to understand and use for me.
Third - The option "Unique match" matches the last record of the lookup table. I am not a english speaking man, may be I dont know the meaning of "Unique" at all. But for me I never thought that that means to match the last record. If we have an option "First match", why not to name this option "Last match"? And - why is this default? For me as SQL joiner, All Matches makes more sense.
Fourth - "All rows" - Why don't use All matches without key instead? Then no 4th Option is used.
Hello,
The "Unique" will match with the last key into the lookup, then if you have several rows with the same key, the last will match ( Unique and Last options had been merged as only "Unique match" since V Talend 3.1, a quite old version).
Contrary to the "First match" which will match with the first loaded row into the lookup if several rows have same key.
"All matches": If several matches are found in the Inner Join, i.e. rows matching the explicit join as well as the filter, all of them will be added to the output flow
For example:
Main Table:
id;name
1;Sabrina
2;plegall
Lookup Table:
id;age
1;11
1;12
1;13
2;21
3;31
Do a inner join with id key and output id, age column.
Unique match(has the same behavior with last match)
1;13
First match, get:
1;11
All match, get:
1;11
1;12
1;13
Our Documentation is heavy on tMap so you should what you want from there.
https://help.talend.com/en-US/components/8.0/talend_components/st-tmap-scenario-link
Best regards
Sabrina
Hi,
thank you for explaining how it works, but I know how it works. What I want is to know why is the naming of the options. That is misleading for me.
"unique" should go on a error, if there is more than one record matching.
On my side it as a bad decision to merge last and unique options.
Regards Winfried