• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Store values into array from Map / vlookup excel?

#1 2009-09-24 19:31:04

pim
New member
Registered: 2009-09-23
Posts: 4

Store values into array from Map / vlookup excel?

Tags: [excel, reject]

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!

Last edited by pim (2009-09-24 19:35:23)

Offline

#2 2009-09-25 04:30:02

shong
Talend team
Registered: 2007-08-29
Posts: 10357
Website

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


Uploaded Images


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2009-09-25 14:52:12

pim
New member
Registered: 2009-09-23
Posts: 4

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

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

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Store values into array from Map / vlookup excel?

Board footer

Powered by FluxBB