Created on 12-20-2021 10:46 PM - edited 12-20-2021 11:03 PM
Hi I have input.csv and Lookup.csv. I have multiple matching records in Lookup.csv.
After lookup how do i get all the related records from Lookup.csv. Below is my requirements.
Please help me finding solution for this, any suggestions will be of great helpful to me, Thanks in advance for you time and suggestions, With CSVRecordLookupService, im getting only last record in lookup.csv
Created 02-14-2022 03:15 PM
Hi
i have the same issue, did you solve it ?
Created 02-14-2022 11:36 PM
The lookup service require that the lookup key be unique for it to work correctly. If there are duplicates you can chose to ignore them, but only one value will ever be returned.
One thing you can do is to consolidate records with the same key under the same line, so all the values will be returned and you can then deal with it (e.g. split the values) in the NiFi flow.
In your example, we could change the lookup files like below:
col2,col5,col6,col7,col8
2,abc,China,123,col8
4,def,USA,118,col8
8,"qwe,zyx","Canada,England","118,118","col8,col8"
Regards,
André
Created 02-15-2022 02:11 AM
Hi Yamaga,
Basically all lookup services in NIFI does not return multiple rows.
In my case i wanted out put in json, so I had converted csv lookup file using JOLT transfomation to have key:[jsonArray], with this i used properties lookup and I got the required output.
Thanks
Ansar