Data Validator
Overview
- Pattern
- Minimum
- Maximum
- MinLength
- MaxLength
- Required
- Type
An example of a pattern can be seen in the following image:

- Pattern is a regular expression, defined as a string value.
- Minimum and Maximum can only be defined for number values. Allowed constraint values are numbers.
- MinLength and MaxLength can only be defined for string values. Allowed constraint values are integers.
- Required can be defined for any value and will verify that a value exists. The Constraint value field is ignored for the Required constraint.
- Type can be defined for any source path. The default is object. Valid type definitions are: string, number, object, array, boolean, date, time, date-time, local-date-time, any.
The type constraint should be defined last in case there are multiple constraints defined for a source path.
Transform-type Snap
Works in Ultra Tasks
Limitations
The Data Validator Snap displays an error if the required field is set to true and no object is passed from the upstream.
Workaround: To validate null or empty values, you can either set a Minimum length Constraint of 1, or use the regex pattern ^.+$“
Snap views
| View | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input | This Snap has exactly one document input view. | |
| Output | This Snap has exactly one document output view. | |
| 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 (
): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- 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: Data Validator Example: Data Validator |
||||||||||||
| Constraints | Required. Define
constraints for one or more fields. If multiple constraints are defined for the same
field using the same constraint, only the first definition is
considered. Available options are:
Default value: N/A Example:
|
|||||||||||||
| Validate full JSON path | Checkbox | Select this property to enable the Snap to verify if all parents in the JSON
path exist, and produce an error if all parents do not exist. Default status: Deselected Example:
When there is only one Constraint Required=true for a Source
path=$a.c.b, but an input document is as follows: The Snap does not produce an error if this property is not selected, even if the JSON path $a.c.b has no values unless there is another Constraint Required=true for a Source path=$a.c. If this property is selected, the Snap produces an error with a reason field. Example, Path not found: $.a.c, Source path: $.a.c.b, Constraint: Required=true. Default status: Deselected |
||||||||||||
| Standardize error output | Checkbox | If true, the Snap produces the error document in standard error format (error,
reason, original, and stack trace). If false, the error document contains error and
original. Default status: Deselected |
||||||||||||
| Snap execution | Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
Default value: Validate and Execute Example: Execute only |
||||||||||||