One Star

[resolved] Use multiple times the same input in one tMap

Hello
I'd like to create a job which use an existing tMap.
I need to make 3 relation to the same input (a other tMap)
The concrete simpliefied :
I have a "user" table with 2 columns : idold and idnew
I have a "company" table with 4 columns : companyid, assigned_to_id, created_by and modified_by.
I want to remap assigned_to_id, created_by and modified_by
Can I duplicate the user tMap ? Or use three out from the user company and connect them in the company tMap ? Maybe use some java ? I am a bit lost.
I imagine that I can chain three tCompanyMap to resolve that case but it seems really complicated ...
How can I do ?
1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: [resolved] Use multiple times the same input in one tMap

Hi
in sql i would create
select * from row3 left join out1 o1 on o1.ids = row3.assigned_user_id left join out1 o2 on o2.ids = row3.created_by
http://www.casimages.com/img.php?i=13012110113163210.png

tMap supports multiple input rows, you just need do a left outer join on tMap as you did on tMap_2.
BTW, please upload the images to the forum next time, it is convenient for us to look them.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
3 REPLIES
Community Manager

Re: [resolved] Use multiple times the same input in one tMap

Hi
You can use tReplicate to duplicate the incoming schema many times. If it does not fit your request, please upload a screenshot of the job showing what you are trying to do.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Use multiple times the same input in one tMap

the original path :
http://www.casimages.com/img.php?i=130121100706650744.png
the tmap :
i want to link created_by / assigned_user_id / modified_user_id to ids (in out1)
i want to create multiple link ..
in sql i would create
select * from row3 left join out1 o1 on o1.ids = row3.assigned_user_id left join out1 o2 on o2.ids = row3.created_by
http://www.casimages.com/img.php?i=13012110113163210.png
i tryied treplicate but I don't understand how it can solve my case
http://www.casimages.com/img.php?i=130121100736193095.png
Community Manager

Re: [resolved] Use multiple times the same input in one tMap

Hi
in sql i would create
select * from row3 left join out1 o1 on o1.ids = row3.assigned_user_id left join out1 o2 on o2.ids = row3.created_by
http://www.casimages.com/img.php?i=13012110113163210.png

tMap supports multiple input rows, you just need do a left outer join on tMap as you did on tMap_2.
BTW, please upload the images to the forum next time, it is convenient for us to look them.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business