Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have two input with the same schema:
clientSiren1
identity | client | info1 | info2 | info3 | info4 | info5 |
A01 | AAA | 1000 | Y | OUI | JACK | 12.5 |
A02 | AAA | 5000 | N | OUI | JACK | 12.5 |
B01 | BBB | 3000 | N | OUI | PAUL | 20.5 |
C01 | CCC | 7000 | Y | OUI | TOM | 100.5 |
C02 |
Hi Asadasing,
tMap configuration for both the join are:
1. Left outer join between clientSiren2(main) and cientSiren1(lookup)
2. Inner join between clientsiren1 and clientsiren2. The rejected output is taken from clientSiren1.
If your query is answered, please mark the topic as resolved.
Thanks
Hello asading,
I think you cannot answer your requirement in one join of the data sources, so here is a suggestion using two joins and a unite.
Job
Please note that for tMap_2 the main input is clientSiren2 and the lookup is clientSiren1!
tMap_2 is configured to do a left outer join with unique match. On the output side, be sure to set "inner join reject" to true!
(Connect all columns from the input clientSiren2/row2 directly to the output panel.)
The output of this tMap_1 is the identity column of row1 and all columns from the Var panel.tMap 1
I admit I did not test run this, but I think it should work. 🙂
Best regards,
Thomas
Hi,
You can get the desired output using two join condition. First, do Left outer join with clientSiren2[main] & clientSiren1[lookup] and second join inner join and the rejected output of this join is taken from clientSiren1. And with tUnite add both the row. After sorting it through Identity column you will get the desired output.
Hi Asadasing,
tMap configuration for both the join are:
1. Left outer join between clientSiren2(main) and cientSiren1(lookup)
2. Inner join between clientsiren1 and clientsiren2. The rejected output is taken from clientSiren1.
If your query is answered, please mark the topic as resolved.
Thanks
Hello,
Small question:
In the first tmap, you have used left outer join with "Unique match".
When using left outer join, it output only all the rows of row8 but what happen when you choose unique match?
Is there some other kind of purpose?
Best regards,
asadasing
Hi,
Unique match is the default option for the JOIN operation. It outputs the last matching record of the lookup source.
We have several options in tMap like first match, Last match.
For example, we have two table
Main table
ID | Name |
1 | Shong |
Lookup table
ID | |
1 | Shong1@talend.com |
1 | Shong2@talend.com |
In the first match, it outputs the First matching record of the lookup source.
And the output will be
|ID|Name |Email | |=-+-------+------------------=| |1 |Shong |Shong1@talend.com |
While in the Unique match it outputs the last matching record.
|ID|Name |Email | |=-+-------+------------------=| |1 |Shong |Shong2@talend.com |
Thanks