cancel
Showing results for 
Search instead for 
Did you mean: 

Create mapping from Excel file

maarts
New Contributor II

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?
2023-07-06 10_28_58-Book1 - Excel

7 REPLIES 7

Aleksandar_A
Contributor III

Hi @maarts,

You can try by following the next steps:

  1. Create a new pipeline and read the Pipeline where you want to update the Mapper by using the SnapLogic Read Snap.

  2. Locate the wanted Mapper in the snap_map property.

  3. 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)

  4. 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.

maarts
New Contributor II

Can you explain more, I do not quite understand how to do what you are suggesting?

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.

darshthakkar
Valued Contributor

@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.