Numerical Range Validator

Specification

{
  "validatorType": String,
  "name": String,
  "description": String,
  "fields": FieldSelectorSpec
  "lowerBound": Double,
  "lowerBoundInclusive": Boolean,
  "upperBound": Double,
  "upperBoundInclusive": Boolean,
  "onNullResult": String
}

Structure Values

Field Name

Type

Description

Required

Default

validatorType

String

The type of validator to construct

Required

name

String

The name of the validator. Must be unique within the validation suite.

Required


description

String

Expanded validator information.


None

fields

Object

A Field Selector Spec

Required

lowerBound

Double

The lower bound of the range. If left unset, the range will have no lower bound.

None

lowerBoundInclusive

Boolean

Whether a value equal to the lower bound should be considered inside of the range.

True

upperBound

Double

The upper bound of the range. If left unset, the range will have no upper bound.

None

upperBoundInclusive

Boolean

Whether a value equal to the upper bound should be considered inside of the range.

True

onNullResult

String

A value of pass, null, or fail that describes how to process null values. Null aggregates them into a null column. Pass aggregates them in with the other passing values. Fail aggregates them in with the other failing values.

null

Example

{
  "validatorType": "numericalRange",
  "name": "sample_range_validator",
  "description": "I can validate ranges",
  "fields": {
    "fieldSelectorType": "Single",
    "fieldName": "col_name"
  },
  "lowerBound": 1.2,
  "lowerBoundInclusive": true,
  "upperBound": 10532.2,
  "upperBoundInclusive": false,
  "onNullResult": "pass"
}



Was this article helpful?
0 out of 0 found this helpful