Assigning the output of a query into the next query

0 votes

I need to create a job in which I have a tMysqlInput component which returns a single row with a single column. Then the output from the tMysqlInput component is fed to the tMongoDBInput to generate multiple docs. But I am facing issues in connecting the tMysqlInput component and tMongoDBInput component using a Row(Main) link. Does anyone have any workable solution to this?

Apr 19, 2018 in Talend by anto.trigg4
• 3,420 points
191 views

1 answer to this question.

0 votes

What I can deduce from your explanation is, you are trying to link two input components using row(main) link. You will obviously face issues in this as Row(main) is used to pass on the data flow from one component to the other. But in your case both are source components which are holding the data. So, to overcome this you need to use an orchestration component called tFlowToIterate. This component is used to read data line by line from the input flow and then store the data entries in iterative global variables.

image

Now you can use the global variables created from the output of tMysqlInput component by the tFlowToIterate in your component query: 

(String)globalMap.get("rowX.ColName").

Here rowX will be the name of the incoming row from the tFlowToIterate component and ColName will be the name of the column of your database.

answered Apr 19, 2018 by misc.edu04
• 1,420 points

Related Questions In Talend

0 votes
1 answer

How to load a set of files into database using Talend

Using tFileList component,  you can read all the files present ...READ MORE

answered Apr 16, 2018 in Talend by code.reaper12
• 3,450 points
689 views
0 votes
1 answer

Naming the output based on a column value in Talend

You can try to solve this problem ...READ MORE

answered Apr 19, 2018 in Talend by 93.lynn
• 1,570 points
351 views
0 votes
2 answers
0 votes
1 answer

Adding third party libraries into the Talend project

You can add the 3rd party libraries ...READ MORE

answered Apr 9, 2018 in Talend by code.reaper12
• 3,450 points
412 views
0 votes
1 answer

tWaitForFile component insufficiency in Talend

Regarding your first issue, tWaitForFile component provides ...READ MORE

answered Apr 10, 2018 in Talend by geek.erkami
• 2,640 points
340 views
0 votes
1 answer
0 votes
2 answers

Closed loop in Talend

Hi, Talend specifies that tUnite cannot be ...READ MORE

answered Aug 22 in Talend by vinceall
359 views
0 votes
1 answer

Creating a New Project in Talend Open Studio

Before you switch over to a new ...READ MORE

answered Apr 18, 2018 in Talend by misc.edu04
• 1,420 points
231 views