Skip to content


The "formula" transform uses an expression to calculate and add a new field to the data objects.


as Required
The (new) field where the computed value is written to
expr Required
An expression string


Given the following data:

x y
1 2
3 4

... and configuration:

  "type": "formula",
  "expr": "datum.x + datum.y",
  "as": "z"

A new field is added:

x y z
1 2 3
3 4 7