Skip to main content

Assertion Node

Quick Reference​

  • Assertion Statement: A FEEL expression that evaluates to boolean. Records where the expression returns true pass through; others generate an error and are routed to the Dead Letter Queue.

💡 Tip: You can learn more about FEEL (Fleak Eval Expression Language) here.

Configuration​

Configuration keys below are relative to the node configuration. Use the field name in the panel when following instructions in the builder; required markers such as an asterisk are not part of the name.

Field in the panelConfiguration keyWhere to edit / when shown
Assertion StatementexpressionNode panel — A FEEL expression that evaluates to boolean. Records where the expression returns true pass through; others generate an error and are routed to the Dead Letter Queue. Required: Yes. Placeholder: $.events.

Overview​

The assertion node checks each record against a FEEL expression. If the result is true, the record passes through unchanged. Any other result, or an error evaluating the expression, generates an error. Failed records are sent to the Dead Letter Queue (DLQ) if one is configured.

Use Assertion when a failed condition should produce an error. Use Filter to drop records that do not match a condition.

Examples​

In FEEL expressions, $ refers to the current record. Use dot-path notation (e.g. $.field) to access fields.

Assert that the status is successful:

$.status == "success"
Input recordResult
{"status": "success"}Passes through unchanged
{"status": "failed"}Generates an error

Assert that required fields are not null:

$.user_id != null and $.transaction_id != null

Assert a numeric value is within an expected range:

$.amount > 0 and $.amount < 10000

Assert that an email value contains @ and .:

str_contains($.email, "@") and str_contains($.email, ".")

Conditional validation based on record type:

case(
$.event_type == "payment" => $.amount != null and $.currency != null,
$.event_type == "registration" => $.email != null and $.username != null,
_ => true
)
  • eval: Transform records using the same expression language
  • filter: Drop records based on specific conditions using FEEL