| | |
|
To start this tutorial, you have to complete the "How to create a File Delimited Metadata" tutorial first.
Next
|
 |
| | |
  |
 | Create the Job Design
|
In the Repository on the left: Right-click on Job Designs. In the menu, click Create Job to open the New Job wizard.
Next
|
  |
In the New Job wizard: In the Name field, fill in: HowtoSetupJoinLink. Click Finish to close the wizard and create your Job. The Job Designer opens an empty Job.
Next
 | In the Name field, accents, special characters and spaces are invalid. Also, do not use numbers to start the field.
|
|
  |
 | Set the connectors reading the file delimited parameters
|
In the Palette on the right: To add an input component, click the File family and the Input sub-family. Click on the tFileInputDelimited component and drop it on the Job Designer. Do the same to add a second tFileInputDelimited component.
Next
|
  |
In the Job Designer: Double-click tFileInputDelimited_1 to show the corresponding Component view to define its Basic settings. In the Component view: Select Repository in the Property Type list and click [...] next to the Edit schema field to check the file schema. The Edit parameter using repository wizard opens.
Next
|
  |
In the Edit parameter using repository wizard: Select View schema (read only) in the option list as you only want to verify the schema. Click OK. The Schema of tFileInputDelimited_1 wizard opens.
Next
|
  |
In the Schema of tFileInputDelimited_1 wizard: The schema is the same as the one you created in the Repository view in Metadata > File delimited. Click OK.
Next
|
  |
In the Job Designer: Double-click tFileInputDelimited_2 to show the corresponding Component view to define its Basic settings. In the Component view: Select Repository from the Property Type list and click [...]. The Repository Content wizard opens.
Next
|
  |
In the Repository Content wizard: Select the states metadata to automatically fill in the tFileInputDelimited_2 Basic settings with the state.txt file properties. Click OK.
Next
|
  |
In the Component view: Click [...] next to the Edit schema field to check the file schema. The Edit parameter using repository wizard opens. Keep View schema (read only) selected as you only want to verify the schema and click OK. The Schema of tFileInputDelimited_2 wizard opens.
Next
|
  |
In the Schema of tFileInputDelimited_2 wizard: The schema is the same as the one available in the Repository view in Metadata > File delimited. Click OK.
Next
|
  |
 | Drop the processing component and the connector writing in the file delimited in the Job Designer
|
In the Palette on the right: To add the processing component, click Processing family. Click on the tMap component and drop it on the Job Designer.
Next
|
  |
In the Palette: To add the output component, click File family and the Output family. Click on the tFileOutputDelimited component and drop it on the Job Designer.
Next
|
  |
 | Link the components
|
In the Job Designer: To link the components together, right-click on tFileInputDelimited_1, hold and drag it to the tMap. Do the same to link the tFileInputDelimited_2 to the tMap and the tMap to the tFileOutputDelimited. In the tMap_1 Output wizard, name the link between the tMap and the tFileOutputDelimited: output.
Next
 | You can also right-click on the component, select Row > Main on the right-click menu, and click the output component to link them together.
|
|
  |
 | Set the processing component and the connector writing in the file delimited parameters
|
In the Job Designer: Double-click on the tMap to open the tMap editor.
Next
 | You can also select the tMap in the Job Designer, click on the Component view and click [...] next to the Map Editor field to open the tMap editor.
|
|
  |
In the tMap editor: In the row1 table, select the id, CustomerName and CustomerAddress columns and drag them to the output table. Then select the idState column and drag it to the idState column of the row2 table. In the row2 table, select the LabelState column and drag it in the output table. Click OK. The Propagate message box opens. Click Yes to propagate the schema you defined in the tMap editor to the next component.
Next
|
  |
In the Job Designer: Double-click on the tFileOutputDelimited to show the corresponding Component view to define its Basic settings. In the Component view: Click [...] next to the File Name field to specify the path of the file to be created. In the wizard, select the customer and state files folder and name the new file customers+states.csv. Check the Include Header box to retrieve the input files header.
Next
|
  |
 | Run the Job
|
In the Job Designer: Press Ctrl+S to save the Job. Press F6 to run it. The Run view displays at the bottom of Talend Open Studio and the console follows the Job execution.
Next
 | Check the Statistic box in the Run view and run this Job again.
|
|
| | |
|
The HowtoSetupJoinLink Job is working! It aggregates data from two input files and creates an output file. Now you have to document it!
Next
|
 |
| | |
  |
 | Document the Job
|
In the Job Designer: To document your Job, title it. Click in the blue area around it. Click the Component view. Check the Show subjob title box and in the Title field, fill in the corresponding title: Set up a Join link. Save your Job again.
Next
|
| | |
|
This tutorial is finished. The Job is working and it's documented. It's your turn now!
|
 |
| | |