Scale
To scale numeric values in fields to specific ranges or apply statistical transformations before applying an ML algorithm
Overview
The Scale Snap is a Transform type Snap that scales numeric values in fields to specific ranges or applies statistical transformations. The Snap helps with data preparation before applying a machine learning algorithm to the data.
The Scale Snap supports the following four transformations:
- Scale to range [0,1]
- Scale to range [-1,1]
- Z-transformation
- Log-transformation

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 has exactly two document input views - the Data input view and the Profile input view.
Note:
The Scale Snap processes the data in streams while the Profile Snap consumes all the data before it derives any statistics. Therefore, while using the Profile Snap:
|
|
Output | This Snap has exactly one document output view. A document with numeric fields that are transformed as per the transformation type. | |
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: Scale Example: Scale numerics |
Policy |
Specify your preferences for a field's transformation. Each policy contains an input Field, transformation Rule, and the result field. The Snap transforms the values in the input field and writes them to the Result field. Note:
You can apply multiple transformations to the same input field. However, the result fields must be different. If the result field is the same as the input field, the Snap overwrites the input field with the result field. |
|
Field | Expression/Suggestion |
The field that must be transformed. This is a suggestible field that suggests all the fields in the dataset. The Snap displays an error message for non-numeric fields. Default: None. |
Rule | Dropdown list |
The type of transformation to be performed on the selected field. The available options are:
For example, if you want to transform 35 with the following statistics:
The result for each transformation rule is as following:
|
Result field | Expression/Suggestion |
The result field to use 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: None. |
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 |