1

I have two tables TableA and TableB

TableA looks similar to following:

customerId  |  name  | email            |telephone
 -------------------------------------------------
 00001      | Anne   | anne@gmail.com   | 123456
 00002      | Ben    | ben@gmail.com    | 
 00003      | Ryan   | ryan@yahoo.com   |

TableB looks similar to following:

customerId | name   | email            | telephone
 ---------------------------------------------------
 76105      | Anne   | anne@gmail.com   | 
 89102      | Ben    | ben@gmail.com    | 567890
 23390      | Ryan   | ryan@yahoo.com   | 756541
 43769      | Abby   | abby@yahoo.com   | 890437

I'm trying to achieve the following 2 tables.

TableC

 customerId  |  name  | email            |telephone
 -------------------------------------------------
  00001      | Anne   | anne@gmail.com   | 123456
  00002      | Ben    | ben@gmail.com    | 567890
  00003      | Ryan   | ryan@yahoo.com   | 756541

TableD

 customerId  |  name  | email            |telephone
 -------------------------------------------------
  43769      | Abby   | abby@gmail.com   | 890437

I was using a tmap with TableA as the main and the TableB as the look up. In the tmap I created an inner join between TableA and TableB using email as the foreign key. I wrote innerJoin outputs to one table and innerJoin rejects to another. However I find some of the records missing in TableC.

What is the correct way to achieve this in Talend DI?

BlueStar
  • 401
  • 3
  • 9
  • 29

1 Answers1

2

I think the choice of the main and the lookup impact the reject catching, here is what you need :

enter image description here

  • tmap :

enter image description here

  • tFixedFlowInput : to simulate your data
  • tLogRow: to display output data
54l3d
  • 3,913
  • 4
  • 32
  • 58