Numeric to Categorical
Overview
This Snap converts categorical fields into numeric fields using Integer Encoding or One Hot Encoding.

Transform-type Snap
Works in Ultra Tasks
Prerequisites
None.
Limitations and known issues
None.
Snap views
View | Description | Examples of upstream and downstream Snaps |
---|---|---|
Input | This Snap supports two document input views: the Data input view and the Profile input view. | |
Output | This Snap supports one document output view. It generates numeric fields from the categorical input. | |
Error |
Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
Snap settings
- Expression icon (
): JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Account configuration.
- Upload
: Uploads files. Learn more.
Field / field set | Type | Description |
---|---|---|
Label | String |
Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: Categorical to Numeric Example: Catgry2Num |
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 | String/Suggestion |
Required. The field that must be transformed. This is a suggestible property that lists all available fields in the input documents. Default value: None Example: $value |
Rule | Dropdown list |
Required. The type of transformation to be performed on the selected field. Two options are available:
Default value: Split by Values Example: Binning |
Prefix/Values | String/Expression | Categorical values to be used to replace original numeric values. You can specify either a prefix or multiple values in this field. For example, if the prefix is "group", the values will be "group_1", "group_2" and so on. In case of specifying values, use comma "," to separate them.
Default value: None Example: v1,v2,v3,v4,v5,v6 |
Splits/Bins | String/Expression | The values to be entered into this property depends on the selection you made in the Rule field.
Default value: None Example: 2,4,6,8,10 |
Result field | String/Suggestion | Required. The result field that must be used in the output map. If the Result field is the same as Field, the values are overwritten. If the Result field does not exist in the original input document, a new field is added. Default value: None Example: $value_1 |
Snap execution | Dropdown list |
Select one of the three modes in which the Snap executes.
Available options are:
Default value: Execute only Example: Validate & execute |