Launching a lookup flow to join complementary data
Based on the previous scenario, this scenario shows how to use a lookup flow to join data of interest in the XML file USState.xml to the main flow. Another tFileInputXML component is added to the Job to load data from the lookup file USState.xml to the processing component tXMLMap.
The content of the XML file USState.xml is as follows:
<?xml version="1.0" encoding="ISO-8859-15"?>
<USStates>
<States>
<idState>1</idState>
<LabelState>Alabama</LabelState>
</States>
<States>
<idState>2</idState>
<LabelState>Connecticut</LabelState>
</States>
<States>
<idState>3</idState>
<LabelState>Ohio</LabelState>
</States>
<States>
<idState>4</idState>
<LabelState>Wyoming</LabelState>
</States>
<States>
<idState>5</idState>
<LabelState>Hawaii</LabelState>
</States>
</USStates>
Adding and linking another input component
Procedure
- In Talend Studio, open the Job used in the previous scenario to display it in the design workspace.
- Add another tFileInputXML component to the Job by typing its name in the design workspace or dropping it from the Palette. Label the component USStates to better identify its function.
- Link the tFileInputXML component labeled USStates to the tXMLMap component using a connection, and the connection is automatically changed to a lookup flow.