In this tutorial, learn how to configure the join outputs in a tMap component.
This tutorial uses Talend Open Studio Data Integration version 6
1. Configure the join model
Note: Clicking the tMap settings button will display a list of parameters to configure your input or output flows. One of the settings available for input flows allows you to change Join Model from the default Left Outer Join to an Inner Join.
Note: When you change the default settings, a red dot with the number 1 on it appears on the tMap settings icon. This indicates that you have changed one parameter of the default tMap settings.
In the Job Designer, observe that a total of 1682 rows of data from the left input are processed by the tMap component. However, only 142 rows appear in the output file. This is because the inner join only produced matches for 142 rows, resulting in the rejection of the other rows.
You can validate the rejection of other rows by viewing the moviesComplete output file. In the file, observe that all movies will have the name of the directors.
2. Create a new output in the tMap component to collect the inner join rejects only
A blank output flow is created.
Note: By changing the Catch lookup inner join reject property to true, you can catch all the lines of data that were rejected by the inner join in the new output.
In the Job Designer, you can observe that out of 1682 rows of the input data, 142 rows appear in the joinedOutput output, and the 1540 rejected rows are collected in the joinRejects output.
You can also view the joinRejects output file and see all the movies that were rejected by the join. These are the movies that do not have directorID in the movies file, plus those that have directorID in the movies file that are absent in the directors file.