This pipeline demonstrates how to use the Numeric to Categorical Snap to convert numeric fields into categorized groups based on their values.
-
Configure the
CSV Generator
Snap to generate input data.
Use the following values to simulate sample employee data:
-
Pass the input to the Type Converter Snap to convert values in the
$experience field to numeric format.
Note: Ensure that the Auto check box is selected in the Type Converter Snap.
-
Use the Copy Snap to duplicate the converted data stream.
The Copy Snap feeds two parallel outputs:
- One to the Numeric to Categorical
Snap for conversion.
- The other to the Profile Snap for field-level statistics.
-
Configure the Profile Snap to compute data statistics on the
$experience field.
Note: The $experience field has a minimum value of 1
and a maximum of 22. These values are required for binning-based
conversion.
-
Configure the Numeric to Categorical Snap to categorize numeric values using the Binning method.
Select Binning as the Rule to convert numeric values in the $experience field into categories: junior, senior, and principal.
This Snap adds a new field $level to the output that classifies employees based on their years of experience.
-
Write the output to a file using the File Writer Snap.
To successfully reuse pipelines:
- Download and import the pipeline in to the SnapLogic Platform.
- Configure Snap accounts, as applicable.
- Provide pipeline parameters, as applicable.