Skip to content

AssertNot

mapping category: assertion no `||`

Fails the record when the input matches a value or one entry of an array of values.

Takes either a single parameter that the input must not match or an array of parameters. If the input equals any of the supplied values the rule fails and the record is dropped. An optional comment is written to the log when the assertion does not match.

Parameters

1forbidden Optional — accepts: BOOLEAN, DATE, FLOAT, INT, STRING, NULL, array

A value, NULL, or an array of values that the input must not equal. Defaults to NULL.

2comment Optional — accepts: STRING

A comment written to the log when the assertion does not match.

Input type

  • BOOLEAN
  • DATE
  • FLOAT
  • INT
  • STRING

Output type

  • same-as-input

Examples

Reject a single value

AssertNot("Error state")

Reject NULL with a comment

AssertNot(NULL, "Null value seen")

Reject any of an array of values

AssertNot([0, 1, 2])

See also

Assert, AssertVocabDomain