Joining 3 input in a TMap

One Star

Joining 3 input in a TMap

Hello,
i'm new to Talend, and i have a problem.
I have 3 input in my Tmap, A,b and C.
input A contain: Id
input B:
         -Id
         -Operator
          -Code_Alpha
input C contains:
          -ID
           -infoA
            -infoB
            -Country
            -Support
The problem is:
Now, the country and support of the input C are empty, the goal is to have the table C as an output, with Country and Support filled in with the right informations.
My probleme is, there is a condition to fill these field, and i don't know how to apply it.
The condition is:
We should keep in mind that InfoA and Info B are different, and B.Id stocks infoA and InfoB
if infoA == A.ID  we take operator and code_alpha from table B where b.Id = infoB and  we assign operator to support and code_alpha to country
if infoB == A.ID  we take operator and code_alpha from table B where b.Id = infoA and  we assign operator to support and code_alpha to country
i hope i was clear in my explanation,
And Thank you for your help in advance,
One Star

Re: Joining 3 input in a TMap

you can split it into two flows.
1st flow , inner join the 3 tables ( infoA == A.ID  we take operator and code_alpha from table B where b.Id = infoB and  we assign operator to support and code_alpha to country )
2nd flow inner join the 3 tables again, (infoB == A.ID  we take operator and code_alpha from table B where b.Id = infoA and  we assign operator to support and code_alpha to country) and you update insert the same table.
or you store both outputs in a file ou hashoutput and you do union.
Good luck
One Star

Re: Joining 3 input in a TMap

Actually what i forgot to mention is, that infoA should'nt be equal to A.id, the condition  is:
 
if infoA is in the tfileInputDelimited then we take operator and code_alpha from table B where b.Id = infoB and  we assign operator to support and code_alpha to country
so for each line in input c i should verify if infoA is in input A  then we take operator and code_alpha from table B where b.Id = infoB and  we assign operator to support and code_alpha to country

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

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now