Matching rows by rownumber in tMap

One Star

Matching rows by rownumber in tMap

Hello,
I have a problem using tMap. The conditions are as follows:
I have 2 files: File X and File Y. They both contain an ID and a string field. The ID is not unique, there can be more that one entry for this ID. So it looks like this:
File X
|ID|Field|
|11|AAA|
|11|BBB|
File Y
|ID|Field|
|11|Azzz|
|11|Bzzz|
I am trying to match them in tMap to get a table like this:
|ID|Field|Field|
|11|AAA|Azzz|
|11|BBB|Bzzz|
I am matching them by the ID, the parameters are:
Lookup Model: Load Once
Match Model: Unique match
Join model: Left outer join
Store temp data: false
Instead, I get the table like this:
|ID|Field|Field|
|11|AAA|Bzzz|
|11|BBB|Bzzz|
I think I may use the row number together with the ID to match them. The row order in both files is always the same. How do I implement the row number for these fields?
Community Manager

Re: Matching rows by rownumber in tMap

Hi
Add a row number for each data flow and then do an inner join between them with the row number, remove the row number column after join, please see my screenshot to know how to add a row number.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads