Store values into array from Map / vlookup excel?

One Star

Store values into array from Map / vlookup excel?

I'n excel there's a function called vlookup and I'm trying to reproduce that in talend by comparing two values, here's my problem, if there's a better way to do this please let me know.
I'm running two queries to a database and I want to compare the results to see if they match.
i.e.
Select color from myFavoriteColors
results = blue, red, orange
Select car, color from myCars
results = myCar1 red, myCar2 purple, myCar3 green, myCar4 blue
I want to be able to compare those results and indicate if there was a match in colors so that I can create an excel file like so
myCar1 | match
myCar2 | no match
myCar3 | no match
myCar4 | match
How can this be done?
at the moment i'm running a query that goes into a map which outputs into a javaRow, only problem is I don't know how to get those values into an array so that I can retrieve that array in another component and use it to compare it against the 2nd query? I would appreciate any help, thanks!
Community Manager

Re: Store values into array from Map / vlookup excel?

Hello
You can do a inner join on tMap, and get the matched rows and reject rows, then output them into two temp files.
In the next subJob, read data from these two files and use a tunite merge all the rows, sort them if need and output result into a excel file.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Store values into array from Map / vlookup excel?

Thanks again for the help! btw talend is an amazing tool.