Skip to main content

Lookup Validator

Specification

{
"validatorType": String,
"name": String,
"description": String,
"fields": FieldSelectorSpec,
"lookupTableSchema": String,
"lookupTable": String,
"lookupColumn": String,
"onNullResult": String,
"caseSensitive": Boolean
}

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
lookupTableSchemaStringThe name of the schema the lookup table will be in.None
lookupTableStringThe name of the lookup table to be used in the validator.Required
lookupColumnStringThe column from the lookup table to be joined with the original table to test the validator with.Required
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
caseSensitiveBooleanApplies case-sensitivity to comparisons with the column value and the values in the lookup list.true

Example

{
"validatorType": "lookup",
"name": "sample_lookup_validator",
"description": "I can validate from another table",
"fields": {
"fieldSelectorType": "Single",
"fieldName": "col_name"
},
"lookupTableSchema": "sample_schema",
"lookupTable": "sample_table",
"lookupColumn": "sample_column_name",
"onNullResult": "pass",
"caseSensitive": false
}