Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
SR2210
Contributor
Contributor

multiple columns that lookup to one single column

Hi,

I would like to get your ideas on my job here. Currently I have one PostgreSQL table (table A) as source table and i need to lookup in another table (table B) to do an inner join. My issue here is I have multiple columns that lookup to one single column.

 

Table A columns:

  1. col_fullname
  2. col_nickname
  3. col_name

Table B columns:

  1. col_id
  2. col_entity_name

 

so basically I need to lookup col_fullname,col_nickname, col_name from table A in col_entity_name from table B to get the id and load the id respectively in destination table that has columns fullname_id, nickname_id and name_id

 0693p00000C8NCuAAN.jpg

Currently in my job i add two tDBinput components to lookup col_fullname and col_nickname. This is how i lookup the columns respectively in tMap

 0693p00000C8NCzAAN.jpg

is there any way that I can do this without having to add multiple lookup table components? because in future i may need to lookup more columns so I'm not sure whether is it possible to only have 1 lookup table component and do all the lookups in the same component.

 

Please let me know if there are anything that's not clear. Thank you in advance 🙂

Labels (3)
1 Reply
Anonymous
Not applicable

Hi

It is impossible to do several lookup on the same table, it means the join has multiple conditions. For the same lookup table, you can load the data only one time into memory using tHashOutput, read the data using tHashInput when it is used.

 

Regards

Shong