This example pipeline demonstrates how to read data in the input schema and remove unwanted columns using 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 - like joining first and last names into a full name column. For example,
$first_name + $last_name
from the Input Schema combined 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.