07-06-2023 01:31 AM
We want to use an Excel file as input for the mapping process. In the example Excel file, we want to use column “Parameter” as the Target_Path and “Value” as the outcome of the Expression.
Any help in how to accomplish that?
07-06-2023 02:31 AM
Hi @maarts,
You can try by following the next steps:
Create a new pipeline and read the Pipeline where you want to update the Mapper by using the SnapLogic Read Snap.
Locate the wanted Mapper in the snap_map property.
Re create the Mapping Table property using the excel file following the same structure that you have in that property (snap_map → property_map → settings → transformations → value → mappingTable → value)
Update the pipeline using the SnapLogic Update Snap.
This is one approach that you can try. 🙂
Let me know if this is helpful.
Regards,
Aleksandar.
07-10-2023 02:11 AM
Can you explain more, I do not quite understand how to do what you are suggesting?
07-10-2023 02:20 AM
Okay, I’ll try my best 😀 .
The pipelines are stored as .slp files (JSON files). To start with you can export one pipeline and open it with your favorite JSON File Editor. Then you can analyze the structure of that file and try to see how the Mapper Snap Setting are stored.
To dynamically change the Mapping Table of a Mapper Snap you can recreate the part where you specify the transformations and update the .slp file and import it or in your case you can update it using the SnapLogic Metadata Snaps.
Hope this helps.
Regards,
Aleksandar.
07-06-2023 07:29 AM
@maarts - You can use a COPY snap and then have a mapper snap consisting only of Parameter on first output of copy snap and Value on the second output of the copy snap. Merge the outputs and get the desired result.