Versions Compared

Key

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


Anaplan Read

Snap type:

Transform

Description:

This Snap provides the functionality to validate incoming data against a set of defined constraints.
Available constraints are:

  • Pattern
  • Minimum
  • Maximum
  • MinLength
  • MaxLength
  • Required
  • Type

An example of a pattern can be seen in the following image:

Image Removed
This will validate

Image Added

The pattern constraint in the screenshot above validates all incoming documents and their attributes a.c.b against the regular expression ^abc, expecting that all attribute values of a.c.b start with abc. If they do, the document is routed to the output view;

 if it does not

 otherwise,

then

the document is routed to the error view.

Note

The type constraint should be defined last in case there are multiple constraints defined for a source path.


Prerequisites:

N/A

Support and limitations:Ultra pipelines: Works 

Works in Ultra Task Pipelines.

 Spark mode: Not supported in Spark mode

The Data Validator Snap fails when using null/empty values for the Required option in the Constraints field. A possible workaround is to enter an arbitrary value, which the Snap does not use when executing the Pipelines.

Account: 

This Snap does not use accounts.

Views:


InputThis Snap has exactly one document input view.
OutputThis Snap has exactly one document output view.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.


Settings

Label


Required. The name for the Snap. You can modify it to be more specific, especially if you have more than one of the same Snap in your pipelinePipeline.

Constraints



Lets you define 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: 

  • Pattern
  • Minimum
  • Maximum
  • MinLength
  • MaxLength
  • Required
  • Type

Default value: N/A


Examples:

 Source Path Constraint Constraint Value
 $numberCol Required Required True
 $numberCol Minimum  Minimum  1
 $numberCol Maximum Maximum 5  5 


Validate full JSON path

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.

Example:

When there is only one Constraint Required=true for a Source path=$a.c.b, but an input document is as follows:

Paste code macro
{
	"a": {
		"b": {
			"c": "xyz"
		}
	}
}

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 value: Unselected

Standardize error output

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 value: False

Multiexcerpt include macro
nameSnap Execution
page

Snap Execution



Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default Value: Execute only
Example: Validate & Execute

Downloads

Multiexcerpt include macro
name

Snap

download_

Execution_Introduced

instructions
page

Anaplan ReadDownloads

OpenAPI

false
Attachments
uploadfalse
old
patterns*.slp, *.zip


Insert excerpt
Flow Snap Pack
Flow Snap Pack
nopaneltrue