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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Daemon_demon
Contributor III
Contributor III

Tmap Joins

Hello,

In one of my situation, the data in my source table is mixture of null and not-null values. I have to do following operations:

  1. If the ip column is null , pass it as is to output say TABLE A
  2. If the ip column is non-null , inner join it with lookup table and send it to the output Table A.
  3. Get the rejects from inner-join performed in step 2 and send it to other table , Table B .

I can perform 2/3 operations using a tMap, is it possible to to perform all 3 ops?

Please not, i am trying to avoid additional components like tfilter or bufferInput

Thanks!

Labels (2)
4 Replies
Anonymous
Not applicable

Hello,

Could you please elaborate your case with an example with input and expected output values?

Best regards

Sabrina

jlolling
Creator III
Creator III

You need 2 tMap components. In the first tMap component you split the incoming flow into 2 output flows. One for null values and the 2. output flow for not null values. The second flow have to be the input for the 2. tMap and here you can do the inner join.

You cannot do everything in one tMap!

Daemon_demon
Contributor III
Contributor III
Author

Hi,

 

Thanks for providing the answers!

 

For @Xiaodi Shi​ 's question for input i had some think like

 

0695b00000aFffOAAS.pngAnd Reference table like :

 

0695b00000aFfeuAAC.png 

I am joining on the 'VAL' column of both tables and trying to get two outputs.

 

One table with PK 1,2 and 3 -> This table should contain all the matching values plus the values for which we have null as input from source such as PK=3.

 

Other table with PK 4 -> This table indicates such values that are present in source bit not in reference table,

 

@Jan Lolling​  . I am currently doing this by using inner join :

 

  1. Create three output tables.
  2. For table 1 will have all the valid values that are matching with the reference table.
  3. Table 2 will be on the inner join's reject records (by enabling the option on catch lookup rejects option ) additionally filtered with the condition where input column is null.
  4. Table3 will be on the inner join's reject records (by enabling the option on catch lookup rejects option ) additionally filtered with the condition where input column is not null.

 

I am storing the table 1 and 2 in tHashoutput which will be later merged and stored.

 

Please let me know if there are any other optimal ways to achieve this tasks.

 

Thanks!!

 

 

jlolling
Creator III
Creator III

I think my former answer works here.