Example 2: Remove columns with Mapper

This example pipeline demonstrates how to read data in the input schema and remove unwanted columns with a Mapper Snap.

Consider that the source has 20 columns, and you need 19 (or fewer) columns in the output:

  1. Configure the JSON Generator Snap with data from which you want to remove specific columns.

  2. Configure the Mapper Snap as follows:

    1. Select the Pass through check.

    2. Choose one of the following two options:

      1. Combine two columns into one column to merge first and last names into a full name column. For example, $first_name + $last_name from the Input Schema combine to display $full_name in the Target path.

      2. Add a column name from the input schema in the expression field in the Mapping table and leave the corresponding Target path field empty. To do this:

        1. From the Input Schema, drag the column names you want to remove from the preview file.

        2. In the Expression field, drag and drop the column name that is not required and leave the corresponding Target path field empty.

        3. Repeat this step for every column that is not required.

  3. Configure the MySQL Insert Snap to insert the data with the required columns.

  4. Validate the pipeline.

Download the 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

File Reduce_columns_using_Mapper.slp

Dec 22, 2023 by Kalpana Malladi