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:
Configure the JSON Generator Snap with data from which you want to remove specific columns.
Configure the Mapper Snap as follows:
Select the Pass through check.
Choose one of the following two options:
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.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:
From the Input Schema, drag the column names you want to remove from the preview file.
In the Expression field, drag and drop the column name that is not required and leave the corresponding Target path field empty.
Repeat this step for every column that is not required.
Configure the MySQL Insert Snap to insert the data with the required columns.
Validate the pipeline.
To successfully reuse pipelines:
Download and import the pipeline into the SnapLogic platform.
Configure Snap accounts, as applicable.
Provide pipeline parameters as applicable.
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.