Four Stars

Multiple input `links merged

Is there any component that allows records from multiple input links to merge (union) and pass out as one output link ?  I tried using tUnite component but it does not accept links from loop flows.

 

My Job Flow:

File --> tmap (2 output links from tmap, this is for converting one row to two rows based on a constraint).

I need to merge these two links together, cant use tUnite, is there any other component that I can use for this purpose?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Five Stars

Re: Multiple input `links merged

I would suggest you follow the way @TRF has suggested. That is the only way you can unite 2 flows that have originated from the same main flow. Talend does not allow splitting of a flow and then merging back again into a single flow.

If you cannot get the t_Hash components enabled, then you can try out tFileoutput as well. t_Hash stores data in memory and tFileoutput will ask you to store it in a file. That is the only difference.

The flow would look something like below

File-->t_map-->output1-->tFileOutput_1
|            |
|        output2-->tFileOutput_2
|
OnsubJobOk
|
|
TFileInput_1----
                        |
                   t_Unite -->t_FileOutput_3
                        |
TFileInput_2----

Five Stars

Re: Multiple input `links merged

You do not need to have 2 onSubJobOK links. Just have one. the other tFileInput can remain floating and it will still work as long as it is connected to tUnite. refer to the job design I put before...for clarity refer below. Also, please share the error that you see in tUnite (I see a red mark there).

 

|

|

onSubJobOK

|

tFileInput_1----

                     |

                  t_Unite --> tFileOutPut_1

                     |

tFileInput_2---

10 REPLIES
Six Stars

Re: Multiple input `links merged

Stick with a tUnite, you can convert a loop flows to a main flow using tIterateToFlow component.

Twelve Stars TRF
Twelve Stars

Re: Multiple input `links merged

You need to store the 2 output into 2 separated tHashOutput, then, start a new subjob with a tHashInput (related to the 1rst tHashOutput) connected to a tUnite and connect the 2nd tHashinput (related to the 2nd tHashInput) to this tUnite.

TRF
Four Stars

Re: Multiple input `links merged

I am using Talend Open Studio for Big Data v6.3.1 edition & it doesnt have tHashOutput component, is there an alternative component for the same in this version

Four Stars

Re: Multiple input `links merged

Are you asking me to design a job like this:

 

InputOracle --> tMap --> One link to tUnite, another link to tIterateToFlow & then re-join with tUnite?

 

If Wrong, can you pl let me know the job design

Six Stars

Re: Multiple input `links merged

Can you provide a screenshot of your job?  Where does your loop flow come from?

Twelve Stars TRF
Twelve Stars

Re: Multiple input `links merged

I do not use TOS for Big Data but maybe it's like for DI, you have to enable thèse components before to use them.
In this case, go to File Menu-->Edit project properties-->PaletteSettings theb enable technical components family.

TRF
Five Stars

Re: Multiple input `links merged

I would suggest you follow the way @TRF has suggested. That is the only way you can unite 2 flows that have originated from the same main flow. Talend does not allow splitting of a flow and then merging back again into a single flow.

If you cannot get the t_Hash components enabled, then you can try out tFileoutput as well. t_Hash stores data in memory and tFileoutput will ask you to store it in a file. That is the only difference.

The flow would look something like below

File-->t_map-->output1-->tFileOutput_1
|            |
|        output2-->tFileOutput_2
|
OnsubJobOk
|
|
TFileInput_1----
                        |
                   t_Unite -->t_FileOutput_3
                        |
TFileInput_2----

Four Stars

Re: Multiple input `links merged

Thanks for your suggesstion. I had already tried this method, attached is the screenshot of my job.

 

So my subjob has the following components: tOracleInput -->t_map-->output1-->tFileOutput_1
| |
| output2-->tFileOutput_2
|

 

So this first subjob is over & that works fine independently.

 

When I give the links OnSubJobOK for the two Input files, I am able to connect one of the 1/P file to tUnite (thro Main link), while the other 1/P file doesnt get connected to tUnite.

 

Pl find the attached screenshot.

Five Stars

Re: Multiple input `links merged

You do not need to have 2 onSubJobOK links. Just have one. the other tFileInput can remain floating and it will still work as long as it is connected to tUnite. refer to the job design I put before...for clarity refer below. Also, please share the error that you see in tUnite (I see a red mark there).

 

|

|

onSubJobOK

|

tFileInput_1----

                     |

                  t_Unite --> tFileOutPut_1

                     |

tFileInput_2---

Four Stars

Re: Multiple input `links merged

Thanks, it worked!