Date Range Validator

Specification

{
  "validatorType": String,
  "name": String,
  "description": String,
  "fields": FieldSelectorSpec
  "from": Instant,
  "to": Instant,
  "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

from

Instant

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

None

to

Instant

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

None

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



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