how to do a lookup in talend?

how to do a lookup in talend?

i have to do a lookup job, so need an help, what are the components i have to use and how to put up with a lookup condition, if i have a snapshot of the job it would be of great help.

thanks in advance,
surya
One Star

Re: how to do a lookup in talend?

Hello,
Lookup is so easy with Talend, the component to use is Tmap.
But the first step is to read the user guide Smiley Happy
http://www.talend.com/resources/documentation.php
JC

Re: how to do a lookup in talend?

lookup is working for matched row,
what is the condition i have to put in tmap to have unmatched rows rejected to the target reject_delimited file?
i have source with these following fields CID,CName,UI,UCN and lookup file with CID,CName,UI,UCN fields
i am doing lookup wrt CID
Thanks & Regards,
Surya
One Star

Re: how to do a lookup in talend?

You have to check "Inner join" (in the left hand side)
And enable inner join reject (3rd arrow in the right hand side of tmap editor)

Re: how to do a lookup in talend?

Ya, i had used the same thing,
see my lookup file has 14 rows, and source has 11 rows, but the matching rows i am getting is 10 rows(expected 11) and unmatched rows i.e., rejected rows=1 (expected 3)
please look at the snapshot
One Star

Re: how to do a lookup in talend?

First, one row seems not to be matching as you expect, you should check your data.
But what you can correct is the order of your inputs :
switch the main and the lookup input flows and I think you will get what you're expecting.
One Star

Re: how to do a lookup in talend?

Everything is ok
You have 11 rows as input so 11 rows as output.
matching rows + unmatched = source
10 + 1 = 11
1 rows is rejected because Tmap can't find it in lookup
You can put row2 as input and row1 as lookup if you expect 14 rows for matched + unmatched

Re: how to do a lookup in talend?

thanx all, got it
One Star

Re: how to do a lookup in talend?

hi

I have lookup from 4 tables to a main table in tmap, my problem is i don't want to run the main table loading job while lookup tables are being loaded since it will lead to error/wrong values in main table since look up is in still loading mode . How to solve this issue?
Five Stars

Re: how to do a lookup in talend?

Hi
I want to use lookup table in my job.
The scenario is I have one input table, one lookup table and one output table. I want to insert one output field from lookup table, which match with two fields from input table with respective two fields of lookup table. If condition satisfy then returns another field as output from lookup table to output table.
Please help.
Moderator

Re: how to do a lookup in talend?

Hi rahul.nawale,
I want to use lookup table in my job.
The scenario is I have one input table, one lookup table and one output table. I want to insert one output field from lookup table, which match with two fields from input table with respective two fields of lookup table. If condition satisfy then returns another field as output from lookup table to output table.

Could you please elaborate an example for your case with input and expected output result?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: how to do a lookup in talend?

Hi Rahul,
This is a very simple and basic implementation using tmap inner join...
Have a look at http://www.talendforge.org/tutorials/tutorial.php?idTuto=9 tutorial....
You will get some insight on how to?
Thanks
Vaibhav
Five Stars

Re: how to do a lookup in talend?

xdshi, sanvaibhav thanks for the reply.
Now lookup is successfully implemented in my job.
Seven Stars

Re: how to do a lookup in talend?

Hi ,
I am having the previous date max value in a separate collection (lookup) collection in another job but while doing lookup for subtracting that value with the max value for the current date i am getting 19 rows in the main row and 3 row in lookup and the result is around 57 rows how to get 19 rows after doing lookup transformation inside talend 
Moderator

Re: how to do a lookup in talend?

Hi krengan21,
Please post your screenshot of your tMap component setting into forum. Did you set your join model as "Left Outer join"?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.