Assert¶
Fails the record unless the input matches a value or one entry of an array of values.
Takes either a single parameter that the input must match or an array of parameters. The input must match one of the supplied values; otherwise the rule fails and the record is dropped. An optional comment is written to the log when the assertion does not match.
Parameters¶
- 1 —
expectedMandatory — accepts: BOOLEAN, DATE, FLOAT, INT, STRING, NULL, array -
A value the input must match,
NULL, or an array of values with the same type as the input. The input must equal one of these values. - 2 —
commentOptional — accepts: STRING -
A comment written to the log when the assertion does not match.
Input type¶
BOOLEANDATEFLOATINTSTRING
Output type¶
same-as-input
Examples¶
Match a single value with comment
Assert input is NULL
Match any of an array of values