Type Converter
To detect and convert the data type of the incoming documents
Overview
This is a Transform type Snap that is used to detect and convert the data type of the incoming documents. It has the ability to automatically derive the type of each value. You can also specify your preference for handling certain fields in the input document.
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 one input document containing data of one or more data types. Data types in the sub-levels in a nested JSON may not be detected. | |
Output | This Snap has exactly one output document where the data types have been converted based on the Snap's settings. | |
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: Type Converter Example: Strings to other types |
Auto | Checkbox |
Select this checkbox to allow the Snap detect the data types automatically. Default status: Selected |
Fail safe upon execution | Checkbox |
Select this checkbox to allow the Snap to ignore the invalid data types and convert the remaining fields containing valid data types. If you deselect this checkbox, the Snap fails if there are any field with invalid data types. Default status: Deselected |
Policy |
Specify your preferences about data types of fields if the auto-mode does not work as expected. |
|
Field | String/Suggestion |
Required. The field that the type has to be converted. This is a suggestible property and suggests all fields in the dataset. Default value: None |
Type | Dropdown list |
Required. The type of transformation to be performed on the selected column. Four options are available:
Default value: String |
Format | String/Expression |
Only applicable for date time type, specify the format. See Simple Date Format for details and Date Functions and Properties for expression examples. Default: None. Example: yyyy-MM-dd'T'HH:mm:ss.SSS'Z' |
Snap execution | Dropdown list |
Select one of the three modes in which the Snap executes.
Available options are:
Default value: Validate & execute Example: Execute only |