One Star

How to use tFlowToIterate component parallel

How to use tFlowToIterate component to parallel do mulitple queries foreach iterate
and then join de queries together with tmap.
do anyone know how to solve this problem with talen Open Studio??

i have tried several options see Printscreens
Its not to possible to connect the tFlowToIterate component to the Mysql_Input component if the Mysql_input component is connect as a Lookup.
Example 1:

Example 2:
4 REPLIES
Seventeen Stars

Re: How to use tFlowToIterate component parallel

You do not need the tReplicate. Every Iterate flow has the option "Enable parallel execution".
One Star

Re: How to use tFlowToIterate component parallel

Hi jlolling,
Maybe i did not explain very well.
but see the picture below this is what i want to do.
i have draw the lines with photoshop for now to show you what i wantSmiley Happy
i did not succed to create this in Talend Open Studio
The Iterate flow Component to multiple Mysql_input component is no problem.
But if all the Mysql_input Component connect to a tmap after then its not possible.
Seventeen Stars

Re: How to use tFlowToIterate component parallel

Simply erase all DiscountLevel_x inputs except the first one and select the iterate flow and take a look at the settings. Here you can find the Execute in parallel option. This will start (per default 2) threads running the query.
One Star

Re: How to use tFlowToIterate component parallel

All DiscountLevel_x are different queries and different tables
1. output of the First sigIds(Mysql_input Component) are 5 Rows (GroupIds, Percentage) which will be Iterate.
2. Every iterate will pass the GroupId and Percentage to the DiscountLevel_x Mysql_input component (Parallel to 4 queries)
3. After all 4 queries has run (discount calculation has finished) it must be join(tMap) to save it in another table.
Data:


DiscountLevel_1


DiscountLevel_2


DiscountLevel_3
etc....
DiscountLevel_4
etc...


tMap output Schema will be look like this:
                   

the output will be saved for each GroupId