Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend: tMAP LookUp - fist match after row

Hello I'm facing an issue using tMap component and Vloopup feature. Basically I got as input an excel file, witch I've duplicate the input, one for main row other for lookup: 
0683p000009MBPJ.png
Excel Column (FileInputExcel_1 + FileInputExcel_3):
0683p000009MBPO.png
My Goal is: FileInputExcel_1 is iterating row by row, for EACH FileInputExcel_1 row I need to lookup FileInputExcel_1 COL3 in COL2 RETURN FIRST MATCH FileInputExcel_3 COL1 value FIRST MATCH FileInputExcel_3 ROW >= actual ROW iteration FileInputExcel_1
ie: ROW 1 result should be 61416:
0683p000009MBPT.png

ie: ROW 5 result should be 3225:
0683p000009MBPY.png

I've already tried to play with tMap, but I don't understand how keep the ROW rules: I'm failing always obtaining the first match despite of the cursor (BN_LINE variable is returned only at and of subjob, so cannot use it). Any idea/workaround? Thanks a lot
Labels (2)
2 Replies
TRF
Champion II
Champion II

Hi,
I got it. Maybe a better solution exists, but this one works fine.
0683p000009MBNE.png
1st, add a column (rank for example) representing the row number in the tFileExcelInput; result buffered into tHashOutput_1
0683p000009MBPd.png
2nd, use the tMap to join tHashOutput_1 with itself, filtering on rank
0683p000009MBNT.png
3rd, eliminate duplicates using tUniqRow
Must be validated with more complex data sample.
That's all.
Ragards,
TRF
Anonymous
Not applicable
Author

After modify match model to "Unique Match" is works 100%
Very useful, thank you!