Loading

Math processor

The Math processor evaluates arithmetic or logical expressions and stores the result in the target field.

To calculate a value using an expression and store the result in a target field:

  1. Select CreateCreate processor.
  2. Select Math from the Processor menu.
  3. Set the Target field where you want to write the expression result.
  4. Set your expression in the Expression field. You can directly reference fields in your expression (for example, bytes / duration).

In YAML mode, configure the math processor using the following parameters. For the complete Streamlang syntax, refer to the Streamlang reference.

Parameter Type Required Description
expression string Yes A TinyMath expression. Can reference fields directly (for example, attributes.price * attributes.quantity).
to string Yes Target field for the result.
ignore_missing boolean No When true, skip this processor if any referenced field is missing.
- action: math
  expression: "attributes.bytes / attributes.duration"
  to: attributes.throughput