Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
RA6
Creator
Creator

Tmap condition

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


To see the whole post, download it here
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

 

Hi Asadasing,

 

tMap configuration for both the join are:

 

1. Left outer join between clientSiren2(main) and cientSiren1(lookup)

0683p000009M6RE.png

 

2. Inner join between clientsiren1 and clientsiren2. The rejected output is taken from clientSiren1.

 

0683p000009M6NJ.png

 

If your query is answered, please mark the topic as resolved.

Thanks

View solution in original post

7 Replies
ThWabi
Creator II
Creator II

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.

 

0683p000009M6SB.pngJob

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.
0683p000009M6SG.pngtMap 1

 

I admit I did not test run this, but I think it should work. 🙂

 

Best regards,

 

Thomas

 

Anonymous
Not applicable

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.

 

0683p000009M6NI.png

 

0683p000009M6QB.png

RA6
Creator
Creator
Author

Hello ,

Thank you for your response.
Can you attached the job please.

I am encountering some difficulty with the tmap configuration.
Thank you.

Best regards,
asadasing
RA6
Creator
Creator
Author

Hello Thomas,

Thank you for your quick response.
Can you attached the job please.

I am encountering some difficulty with the tmap configuration.
Thank you.

Best regards,
asadasing
Anonymous
Not applicable

 

Hi Asadasing,

 

tMap configuration for both the join are:

 

1. Left outer join between clientSiren2(main) and cientSiren1(lookup)

0683p000009M6RE.png

 

2. Inner join between clientsiren1 and clientsiren2. The rejected output is taken from clientSiren1.

 

0683p000009M6NJ.png

 

If your query is answered, please mark the topic as resolved.

Thanks

RA6
Creator
Creator
Author

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?

 

0683p000009M6KK.png

 

Best regards,

asadasing

Anonymous
Not applicable

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 Email
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