Many to Many lookups help.

Five Stars

Many to Many lookups help.

 

Hi,

Could you please tell how to lookup two files based on column "ParentID" and get out as below:


Consider a sample input file1 as below, which has two ParentID's:

ParentID,UserTypeID,AttributeID,Value
"9197741","ProductLine","ATT_Industry","Heavy Equipment"
"9197741","ProductLine","ATT_Industry","Transportation"
"9547005","ProductLine","ATT_Industry","Furniture"
"9547005","ProductLine","ATT_Industry","Kitchen Cabinetry"
"9547005","ProductLine","ATT_Industry","Interior Building Products"


Consider another sample file2 which has 3 SKU .
SKU_ID,UserTypeID,ParentID
"9205295","SKU","9197741"
"501247241","SKU","9547005"
"501247233","SKU","9547005"


Output: 

For each row in file1 :
              For each SKU_ID in file 2 which has a ParentID in file1 , get 'value' from file1 and SKU_ID from file2.

SKU_ID, Value
9205295,"Heavy Equipment"
9205295,"Transportation"
501247241,"Furniture"
501247241,"Kitchen Cabinetry"
501247241,"Interior Building Products"
501247233,"Furniture"
501247233,"Kitchen Cabinetry"
501247233,"Interior Building Products"


Accepted Solutions
Five Stars

Re: Many to Many lookups help.

Inner join with match model -All rows worked.

 

Thank you!

View solution in original post


All Replies
Eleven Stars

Re: Many to Many lookups help.

Inner join should work in tmap.

Regards
Abhishek KUMAR
Five Stars

Re: Many to Many lookups help.

Inner join with match model -All rows worked.

 

Thank you!

View solution in original post

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog