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

One Star sg9
One Star

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,
One Star

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

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 Smiley Sad
One Star

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

Have you tried adding multiple instances of row2 in a tMap? Perform 6 different joins on the same input table.
One Star sg9
One Star

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

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.
One Star

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

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.
One Star sg9
One Star

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

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,
One Star

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

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

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

Can you normalise the six fields before tMap so there is only one lookup?
One Star sg9
One Star

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

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.
Seven Stars

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

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.