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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to look-up 6 fields from one row at the same time

Hi,
i have row1 with six fields: row1.f1, row1.f2,row1.f3,row1.f4,row1.f5,row1.f6. I want to look up each field on row2.field and get row2.description for each one. Is this possible?
thank you,
Labels (2)
9 Replies
Anonymous
Not applicable
Author

Hi
You can write in the expression part as
row.f1.equals(row2.field)||row.f2.equals(row2.field)||row.f3.equals(row2.field)||row.f4.equals(row2.field)||row.f5.equals(row2.field)||row.f6.equals(row2.field)
If your lookup file size is huge this method will take long time 0683p000009MPcz.png
Anonymous
Not applicable
Author

Have you tried adding multiple instances of row2 in a tMap? Perform 6 different joins on the same input table.
Anonymous
Not applicable
Author

HI,
adding 6 different works perfectly, but only with 4 joins. When i add all 6 i get this error:
"The code of method tAccessInput_1Process(Map<String,Object>) is exceeding the 65535 bytes limit"
I tired removing all unnecessary fields but i still get the error.
Anonymous
Not applicable
Author

Do you get the same error if you create a job that combines only the 6 lookups with the 1 main flow via a tMap? That is, no other filters, context variables, routines, etc.
Anonymous
Not applicable
Author

No, no errors if use only 1 main flow.
After the join process i need to Normalize, Filter, tBreak, tMap with output to two different CVS files, one of which has another Filter before. When i removed all these processes it works fine, so i guess i need to improve them !?
Thank you,
Anonymous
Not applicable
Author

Try to build your job back up. Start with adding the tFilterRows back and use 2 CSV files in the tMap.
alevy
Specialist
Specialist

Can you normalise the six fields before tMap so there is only one lookup?
Anonymous
Not applicable
Author

Hi alevy,
i don't know if i understood you correctly, but the purpose is to concatenate the descriptions coming from row2.description. So basically i have to keep the same number of rows, and replace the six fields (which are holding IDs from row2) with one text field holding concatenated descriptions.
alevy
Specialist
Specialist

You should be able to use tSplitRow to normalise each row1 into 6 rows (each having a key of the original row number and one of the f fields) then feed into tMap to lookup the description from row2 for each f field then use tDenormalize to concatenate each of the 6 descriptions back into one row.