tMap in Java Unique, First, ... Match

One Star

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"?
Employee

Re: tMap in Java Unique, First, ... Match

"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.
Community Manager

Re: tMap in Java Unique, First, ... Match

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
----------------------------------------------------------
Talend | Data Agility for Modern Business
Seventeen Stars

Re: tMap in Java Unique, First, ... Match

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" Smiley Happy
(seems that plegall have a look for that on fluxbb forum)
and thanks to all on this forum!
One Star

Re: tMap in Java Unique, First, ... Match

Hi shong,
Thanks for explain with very good example.
Thank you,
Nitin
Four Stars

Re: tMap in Java Unique, First, ... Match

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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now