Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tMap in Java Unique, First, ... Match

Hi,
Thanks for all your previous answers. Could someone explain exactly how does the options Unique/First/Last/All matches work? In fact my question is more about "unique", in what is it different from "First"?
Labels (2)
5 Replies
amaumont
Contributor III
Contributor III

"Unique" and "Last match" have same behavior and will be merged as only "Unique match" into the next release 3.1.
"Unique" or "Last match" will match with the last key into the lookup, then if you have several rows with the same key, this will the last will match.
Contrary to the "First match" which will match with the first loaded row into the lookup if several rows have same key.
Anonymous
Not applicable
Author

Hello
Thanks for all your previous answers.

If the answers solve your question, please say a word in each topic to thank other users/developers, so we know you have fit your questions.
what is it different from "First"?

I show a use case to explain your question,eg:
main:
id;name
1;shong
2;plegall
lookup:
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" and "Last match" have same behavior, get:
1;13
first match, get:
1;11
all match, get:
1;11
1;12
1;13
Best regards

shong
Anonymous
Not applicable
Author

hi,
If the answers solve your question, please say a word in each topic to thank other users/developers,...

just a little suggestion about that ...
it 'll be great to add a "resolved" status to this forum for "complete answered topics" 0683p000009MACn.png
(seems that plegall have a look for that on fluxbb forum)
and thanks to all on this forum!
Anonymous
Not applicable
Author

Hi shong,
Thanks for explain with very good example.
Thank you,
Nitin
jkrfs
Creator
Creator

Shong,
How can you get this to work if you have the data reverse? Meaning your main is id/age and the lookup is id/name. It seems that unique/first match does not work in this way.
Thanks