Full Outer Join by Using tmap in Talend

Posted on by By Nikhilesh, in Business Intelligence, ETL, Talend | 2

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.

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

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.

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

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:

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

fulljoin

Thanks and Regards,

Lalitha

logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

0 0 votes
Article Rating
Subscribe
Notify of
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

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

Very creative solution. My particular problem is that one of my sources for which in need in the outer join takes a while to run, I would like to outer join two row sources without running the extraction twice.

I see there is a “use temp data” option in the tMap, I haven’t used it yet, I wonder if this is a good use case for it?