Skip to end of banner
Go to start of banner

Example 1: Remove columns from Excel files with Mapper

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

This example pipeline demonstrates how to read an Excel file from the SLDB and remove columns that you do not need from the file.

  1. Configure the File Reader Snap to read the Excel file from which you want to remove specific columns.

  1. Parse the file with the Excel Parser Snap. You can preview the parsed data by clicking the (blue star)  icon.

  1. You can view the columns you want to remove from the preview file. Add a Mapper Snap to the pipeline to remove the Discounts and Month Number columns.

  1. In the Expression field, enter the criteria (as shown below) to remove the Discounts and Month Name columns. 

  2. $.filter((value, key) => !key.match("Discounts|Month Number"))

  3. Enter $ in the Target field to indicate that you want to leave the other column names unchanged. Validate that the Discounts and Month Name columns are removed.

  1. To write the updated data into the SLDB as a JSON file, add a JSON Formatter Snap to the pipeline to convert the documents from the Mapper Snap into binary data.

  2. Then, add a File Writer Snap and configure it to write the input streaming data to the SLDB.

You can now view the saved file in the destination project in SnapLogic® Manager.

Download this pipeline

To successfully reuse pipelines:

  1. Download and import the pipeline into the SnapLogic platform.

  2. Configure Snap accounts, as applicable.

  3. Provide pipeline parameters, as applicable.

  File Modified
You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.
No files shared here yet.
  • Drag and drop to upload or browse for files
    • No labels