Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Purpose of tFlowToIterate and tIterateToFlow

Hi Team,
I was trying to understand the exact purpose of tFlowToIterate and tIterateToFlow components. I tried to understand the components by reading the documentation available for the components, but it could not help me. I didn't exactly understand the actual use.
Can any one explain me with a good scenario that can be easily understandable and grasped.
Thanks in advance for the solutions you are going to post.
Thanks and Regards,
Pavan
Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi Pavan
Two scenarios would explain these two components.
Scenario 1---tFlowToIterate:
Let's say we have a mysql table called tableA which contains queries like "select * from tableB". I need to extract thses queries from tableA and use them for extracting data from tableB.
tMysqlInput(tableA)--main(row1)-->tFlowToIterate--Iterate-->tMysqlInput_2--main-->tLogRow
In tMysqlInput_2, I type this expression 'row1.query' in the query text field on tMysqlInput_2 for further extraction.
Scenario 2---tIterateToFlow:
tFileList--Iterate-->tIterateToFlow-->tLogRow
How can I get all file names from the specified directory and print them on console?
Use tIterateToFlow as the following image.
Regards,
Pedro
Anonymous
Not applicable
Author

Hi Pedro,
Thank you for the scenarios!
Thanks and Regards,
Pavan
Hi Pavan
Two scenarios would explain these two components.
Scenario 1---tFlowToIterate:
Let's say we have a mysql table called tableA which contains queries like "select * from tableB". I need to extract thses queries from tableA and use them for extracting data from tableB.
tMysqlInput(tableA)--main(row1)-->tFlowToIterate--Iterate-->tMysqlInput_2--main-->tLogRow
In tMysqlInput_2, I type this expression 'row1.query' in the query text field on tMysqlInput_2 for further extraction.
Scenario 2---tIterateToFlow:
tFileList--Iterate-->tIterateToFlow-->tLogRow
How can I get all file names from the specified directory and print them on console?
Use tIterateToFlow as the following image.
Regards,
Pedro
Anonymous
Not applicable
Author

hello pedro, very nice your comment, I wonder if I can use the scenario-1 tFlowToIterate and within tMysqlInput use update and delete clauses, thanks
Anonymous
Not applicable
Author

Hi,
Do you want to iterate over each of the rows returned from the second query and use them to populate a command to be executed for each row in the first set?
Such as:tMysqlInput_1--main(row1)--tFlowToIterate--tMysqlInput_2--main--tLogRow
on tMysqlInput, set the query like:
"select * from tableName where id="+(Integer)globalMap.get("row1.id")
For your update and delete clauses, txxxrow component is preferred.
Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III

@xdshi -do you know if it is possible to use the tFlowToIterate to loop through records and create a JSON string every X-Number of records?