This scenario describes a basic Job that reads a defined XML directory and extracts specific information and outputs it on the Run console via a tLogRow component.
Drop tFileInputXML and tLogRow from the Palette to the design workspace.
Connect both components together using a Main Row link.
Double-click tFileInputXML to open its Basic settings view and define the component properties.
As the street dir file used as input file has been previously defined in the Metadata area, select Repository as Property type. This way, the properties are automatically leveraged and the rest of the properties fields are filled in (apart from Schema). For more information regarding the metadata creation wizards, see Talend Studio User Guide.
Select the same way the relevant schema in the Repository metadata list. Edit schema if you want to make any change to the schema loaded.
The Filename shows the structured file to be used as input
In Loop XPath query, change if needed the node of the structure where the loop is based.
On the Mapping table, fill the fields to be extracted and displayed in the output.
If the file size is consequent, fill in a Limit of rows to be read.
Enter the encoding if needed then double-click on tLogRow to define the separator character.
Save your Job and press F6 to execute it.
The fields defined in the input properties are extracted from the XML structure and displayed on the console.