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,440 points
3,202 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,450 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 17, 2018 in Talend by code.reaper12
• 3,500 points
6,174 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,600 points
2,596 views
0 votes
0 answers

How can I use talend to extract data from Oracle and import the data into a MSSQL database?

We currently have around 100 Oracle tables ...READ MORE

Nov 4, 2020 in Talend by umesh
• 150 points
2,567 views
0 votes
2 answers
0 votes
1 answer

tWaitForFile component insufficiency in Talend

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

answered Apr 11, 2018 in Talend by geek.erkami
• 2,680 points
2,513 views
+1 vote
1 answer
0 votes
2 answers

Closed loop in Talend

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

answered Aug 23, 2019 in Talend by vinceall
2,341 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,450 points
2,082 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP