Skip to main content

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 NameTypeDescriptionRequiredDefault
validatorTypeStringThe type of validator to constructRequired
nameStringThe name of the validator. Must be unique within the validation suite.Required
descriptionStringExpanded validator information.None
fieldsObjectA Field Selector SpecRequired
lowerBoundDoubleThe lower bound of the range. If left unset, the range will have no lower bound.None
lowerBoundInclusiveBooleanWhether a value equal to the lower bound should be considered inside of the range.True
upperBoundDoubleThe upper bound of the range. If left unset, the range will have no upper bound.None
upperBoundInclusiveBooleanWhether a value equal to the upper bound should be considered inside of the range.True
onNullResultStringA 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.fail

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"
}