Skip to main content

Date Range Validator

Specification

{
"validatorType": String,
"name": String,
"description": String,
"fields": FieldSelectorSpec
"from": Instant,
"to": Instant,
"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
fromInstantThe lower bound of the range. If left unset, the range will have no lower bound.None
toInstantThe upper bound of the range. If left unset, the range will have no upper bound.None
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": "dateRange",
"name": "sample_date_range_validator",
"description": "I can validate date ranges",
"fields": {
"fieldSelectorType": "Single",
"fieldName": "col_name"
},
"from": "2020-01-01T00:00:00Z",
"to": "2023-01-01T00:00:00Z",
"onNullResult": "pass"
}