Four Stars

Regarding the Joins in Tmap

Hi,

I am joining two columns in Tmap (inner join).

But the case is any one of the column data got matches that record should flow ( not mandatory for the two values to get matched).

What all the steps I need to take care in table level and talend level.

Ex : Main flow columns 1,2

look up columns a,b

Joining 1 with a and 2 with b..

if any of the join condition is true (1=a or 2=b) I want to that value to flow.

It should pass even any one of the column data is null, any how I will handle the nulls but if the one column data is empty it should flow

 

Thanks in advance.

Viswanatha Challa

1 REPLY
Eleven Stars

Re: Regarding the Joins in Tmap

Do not join the inputs, unless you have a natural join which is not optional. Use the tMap variables (from the box in between the inputs and outputs) to "join" the optional inputs. Use some logic similar to this.....

 

row1.column.equals(row2.column)

Then use that variables in the output logic for the output table. The variable will need to be set as a boolean (the code above returns a boolean). This way you can add all sorts of bespoke logic to your tMap.

Rilhia Solutions