Full Outer Join by using tmap in Talend

In tMap, the default Join Model is Left Outer Join and also we have  Inner Join as another Join Model. Suppose if we need the result for full outer join ,you can follow the below process.

I have Customers.csv and City.csv as my two delimited files. where City is the common field in the both the files.

First, please find the data in the two csv files as below:

Customers.csv:

customers

City.csv:

city

Following is the Talend Job :

job

First create a FileDelimited Metadata in the repository as shown in above picture.

Consider Customers as main link and city as lookup and join both to tMap component. In tMap you have to select Join Model as Inner Join and catch the inner join output reject records and configure as shown in below screen-shot:

tmap1

Now as shown in the job image, again take same city and customer inputs but change city as main link and customers as lookup.

In tmap select the Join Model as Left Outer join and also configure the tMap2 component as shown below:

tmap2

Now take tunite component to retrieve the innerjoin reject values from tMap1 and left outer join values from tMap2. And now take tsortrow to sort the result in asc/desc order(I consider custid column) and then the final result stored on fulljoin.csv file.

And the out put is as follows:

fulljoin

Thanks and Regards,

Lalitha

1 comment

  1. jitesh

    For the scenario,have you tried “AllMatch” match model in tmap

Leave a Reply