Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel3

Overview

This is a Transform type Snap that converts numeric fields into categoricalfields. There are two available splitting options: splitting by values and binning.

Image RemovedImage Added

Input and Output

Expected input

  • Dataset in In the first input view, a document that contains numeric fields.
  • Profile information in the second input view.

Expected output: Document data containing the original dataset along with the data converted from numeric to categorical format A document that contains categorical fields.

Expected upstream Snaps:

  • First Input View: Any Snap, such as the CSV Generator Snap, that offers a document view in its output.
  • Second Input View: A Profile Snap that offers data statistics necessary for performing a numeric to categorical conversion, or a combination of a File Reader Snap and JSON Parser Snap to read the profile information from SLDB We recommend a sequence of File Reader and JSON Parser Snaps. These Snaps read the data statistics generated by the Profile Snap in another pipeline.

Expected downstream Snaps: Any Snap that accepts document data in the input view. Example: Mapperthe Agrregate Snap, or a combination of JSON Formatter and File Writer to write the file to SLDB.

Prerequisites

A basic understanding of the sampling algorithms supported by the Snap is preferableNone.

Configuring Accounts

Accounts are not used with this Snap.

Configuring Views

 Input

This Snap has exactly two

input views

document input views, the data input view and the profile input view.

OutputThis Snap has exactly one document output view.
ErrorThis Snap has at most one document error view.

Troubleshooting

None

Limitations and Known Issues

None

Modes

  • Ultra pipelines:Works with Ultra Pipelines only when the Profile Snap is not used upstream Works in Ultra Pipelines.
  • Spark mode:Does not support Spark  Not supported in Spark mode.


Snap Settings


LabelRequired. 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

This setting allows you to specify your preferences about fields and transformations. For each field, it is possible to apply multiple transformations, this results in multiple

output fields. Note that the policy is applied from top to bottom.

Field

The field to be transformed. This is a suggestible field and will suggest all fields in the dataset.

Default value: None

Rule

The type of transformation to be performed on the selected field. Two options are available:

  • Split by valuesValues: Splitting the data range into ranges specifies by "Split points" optionspecified by the Splits/Bins option. Each range will be is replaced with the text specified in in the Prefix/Values property.
  • Binning: Splitting the data range into equally-sized ranges based on the number of ranges specified by in the number of  Prefix/Values property below.
Please see the example below for better understanding.
  • . If the Prefix/Values field is used, the number of bins needs to be specified in the Splits/Bins field.

Default value: Split by Values

Prefix/Values

Categorical values to be used to replace original numeric values. You can use the values in this field either as a prefix or values. 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

Splits/Bins

The values to be entered into this field change based depend on the selection you made in the Rule field.

  • If you chose Split by valuesValues: This setting must contain a list of split points. "2,4,6,8,10" is the same as "2,4,...,10".
  • If you chose Binning: This setting is the number of bins.

Default value: None

Result field

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




Snap History

Insert excerpt
ML Data Preparation Snap Pack
ML Data Preparation Snap Pack
nopaneltrue