In Talend Open Studio, looping or repeating actions are formed using either Flows or Iterators. To bridge the two, there are adapter components: tIterateToFlow, tFlowToIterate.
Take the following job as an example
|Two Forms of Repeating Actions in TOS|
Two tFileLists are used to drive the processing (a System.out.println). The first tFileList uses the Iterate connector fed into a tJava. For each file found in the tFileList, the tJava is invoked. No data is sent to the tJava. The tJava accesses a global variable available after each tFileList iteration.
|tJava Code Iterate Connector|
To convert the list of files into a Flow where each file is a row, use the tIterateToFlow adapter. This requires defining a schema that will be filled in the Mapping section of the tIterateToFlow adapter.
|Single Column Schema of a tIterateToFlow|
|Flow-based Code Displaying tFileList|