
Component family |
Orchestration |
|
Function |
tIterateToFlow transforms a list |
|
Purpose |
Allows you to transform non processable data into a processable |
|
Basic settings |
Schema and Edit |
A schema is a row description, it defines the number of fields Since version 5.6, both the Built-In mode and the Repository mode are Click Edit schema to make changes to the schema. If the
|
|
|
Built-in: The schema will be |
|
|
Repository: The schema already |
|
Mapping |
Column: Enter a name for the
Value: Press Ctrl+Space to access all of the available variables, |
Advanced Settings |
tStatCatcher Statistics |
Select this check box to collect the log data at a component |
Global Variables |
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see Talend Studio |
|
Usage |
This component is not startable (green background) and it requires |
|
Connections |
Outgoing links (from this component to another): Row: Main.
Trigger: Run if; On Component Ok; Incoming links (from one component to this one): Row: Iterate; For further information regarding connections, see |
The following scenario describes a Job that iterates on a list of files, picks up the
filename and current date and transforms this into a flow, that gets displayed on the
console.

-
Drop the following components: tFileList,
tIterateToFlow and tLogRow from the Palette to the
design workspace. -
Connect the tFileList to the tIterateToFlow using an iterate link and connect the Job to the tLogRow using a Row main
connection. -
In the tFileList
Component view, set the directory where the
list of files is stored.

-
In this example, the files are three simple .txt files held in one directory:
Countries. -
No need to care about the case, hence clear the Case
sensitive check box. -
Leave the Include Subdirectories check box
unchecked. -
Then select the tIterateToFlow component et
click Edit Schema to set the new schema

-
Add two new columns: Filename of String type and Date of date type. Make sure you define the correct pattern
in Java. -
Click OK to validate.
-
Notice that the newly created schema shows on the Mapping table.

-
In each cell of the Value field, press
Ctrl+Space bar to access the list of global
and user-specific variables. -
For the Filename column, use the global variable:
tFileList_1CURRENT_FILEPATH
. It retrieves the current filepath
in order to catch the name of each file, the Job iterates on. -
For the Date column, use the Talend routine:
TalendDate.getCurrentDate()
(in
Java) -
Then on the tLogRow component view, select
the Print values in cells of a table check
box. -
Save your Job and press F6 to execute
it.

The filepath displays on the Filename column and the current date
displays on the Date column.