On this Page
Overview
This is a Transform type Snap that converts categorical fields into numeric fields. There are two available encoding options: Integer Encoding and One Hot Encoding.
Input and Output
Expected input
- First input view: A document containing categorical fields.
- Second input view: A document containing data statistics computed by the Profile Snap.
Expected output: A document containing numeric field.
Expected upstream Snaps
- First input view: A Snap that has a document output view. For example, Mapper, CSV Generator, or Categorical to Numeric.
- Second input view: A sequence of File Reader and JSON Parser Snaps. These Snaps read the data statistics computed by the Profile Snap in another pipeline. It is required to select Value distribution in the Profile Snap and set Top value limit according to the number of unique values; or set to 0, which means unlimited.
Expected downstream Snaps: A Snap that has a document input view. For example, Mapper, JSON Formatter, or Type Converter.
Prerequisites
None.
Configuring Accounts
Accounts are not used with this Snap.
Configuring Views
Input | This Snap has exactly two document input views, the Data input view and the Profile input view. |
---|---|
Output | This Snap has exactly one document output view. |
Error | This Snap has at most one document error view. |
Troubleshooting
None
Limitations and Known Issues
None
Modes
- Ultra pipelines: Works in Ultra Pipelines.
- Spark mode: Not supported in Spark mode.
Snap Settings
Label | Required. The name for the Snap. Modify this to be more specific, especially if there are more than one of the same Snap in the pipeline. |
---|---|
Policy | The preferences for fields and encoding methods. For each policy, select the input field with categorical values, the encoding method, and the result field. |
Field | Required. The field that must be transformed. This is a suggestible property that lists all available fields in the input documents. Default value: None. |
Rule | Required. The type of transformation to be performed on the selected field. Two options are available:
Default value: Integer Encoding |
Result field | Required. The result field that is used in the output map. If the variable in the Result field property is the same as the one in the Field property, the values are overwritten. If the Result field does not exist in the original input document, a new field is added. Default value: None. |
Page lookup error: page "Anaplan Read" not found. If you're experiencing issues please see our Troubleshooting Guide. | Page lookup error: page "Anaplan Read" not found. If you're experiencing issues please see our Troubleshooting Guide. |
Examples
Assigning Team based on Position
This pipeline demonstrates how you can use the Categorical to Numeric Snap to assign team number for employees (numeric) based on their position (categorical).
Download this pipeline.
Additional Example
The following use case demonstrates a real-world scenario for using this Snap:
Downloads