10-13-2021 01:47 PM
Hi,
I have the following use-case and I haven’t found any way to get it done within SnapLogic. I am wondering if it is possible at all using this tool.
I have a CSV File in Snaplogic Designer with the following fields (example) $ID, $Name, $AmountPaid1, $AmountPaid2.
I also have an Excel File with the following fields: $ID, $AmountPaid2.
I want to alter the original CSV file by “looking up” the excel file and replacing the value of $AmountPaid2 (in the CSV) with the value of $AmountPaid2 from the excel file, only where $ID from the excel = $ID from the CSV.
Any suggestions?
Solved! Go to Solution.
10-13-2021 10:19 PM
Hi @JPaps,
Yes, developing this logic in SL is very much possible. I am attaching a sample pipeline which does exactly what you need:
Lookup_2021_10_14.slp (8.9 KB)
Regards,
Bojan
10-13-2021 10:19 PM
Hi @JPaps,
Yes, developing this logic in SL is very much possible. I am attaching a sample pipeline which does exactly what you need:
Lookup_2021_10_14.slp (8.9 KB)
Regards,
Bojan
10-21-2021 01:15 PM
Thanks very much for your help @bojanvelevski . I have used the example in the sample pipeline that you sent and strangely enough, my output document is unchanged. The only difference is that I am joining on two fields instead of 1. I am stumped as to what is preventing this from working.
10-21-2021 02:48 PM
It would help to tell us why you’re joining on another field and which field, though it looks like $AmountPaid2 is the only other field you could join on. But including that field in the join does not make sense based on your description – you want to replace the value of $AmountPaid2 in the CSV because the $AmountPaid2 value in the Excel file is different, right? Joining only on $ID should be exactly what you need. The pipeline that @bojanvelevski provided does exactly what you asked, does it not?
10-21-2021 03:07 PM
Thanks for your response. I have simplified my use case to make it easier to communicate here. I am left outer joining on two fields instead of just one because for my use case, the unique identifier is made up of two fields since the output document has duplicate ids.
@bojanvelevski’s solution works in his sample but when I use the same logic with the exception of left outer joining on two fields (2 fields = the unique identifier), my output data is unchanged.
The unique identifier is called ID and COV. The excel that I am joining has matching ID and COV with the output document but it doesn’t seem to work.