TransformItems TransformItems

yaml
type: "io.kestra.plugin.transform.jsonata.TransformItems"

Transform or query a JSON data using JSONata language.

JSONata is a sophisticated query and transformation language for JSON data.

Examples

Transform JSON payload using JSONata expression.

yaml
id: "transform_items"
type: "io.kestra.plugin.transform.jsonata.TransformItems"
id: jsonata
namespace: example
tasks:
- id: transformJson
  type: io.kestra.plugin.transform.jsonata.TransformItems
  from: {{ previousTask.outputs.uri }}
  expression: |
     {
        "order_id": order_id,
        "customer_name": customer_name,
        "total_price": $sum(items.(quantity * price_per_unit))
     }

Properties

expression

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The JSONata expression to apply on the JSON object.

from

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The file to be transformed.

Must be a kestra:// internal storage URI.

maxDepth

  • Type: integer
  • Dynamic: ✔️
  • Required: ✔️
  • Default: 1000

The maximum number of recursive calls allowed for the JSONata transformation.

Outputs

Definitions

Was this page helpful?