
JSONata TransformValue
CertifiedTransform or query a JSON string using JSONata
JSONata TransformValue
Transform or query a JSON string using JSONata
JSONata is a query and transformation language for JSON data.
type: io.kestra.plugin.transform.jsonata.TransformValueExamples
Transform JSON data using a JSONata expression
id: jsonata_transform_value
namespace: company.team
tasks:
- id: transform_json
type: io.kestra.plugin.transform.jsonata.TransformValue
from: |
{
"order_id": "ABC123",
"first_name": "John",
"last_name": "Doe",
"address": {
"city": "Paris",
"country": "France"
},
"items": [
{
"product_id": "001",
"name": "Apple",
"quantity": 5,
"price_per_unit": 0.5
},
{
"product_id": "002",
"name": "Banana",
"quantity": 3,
"price_per_unit": 0.3
},
{
"product_id": "003",
"name": "Orange",
"quantity": 2,
"price_per_unit": 0.4
}
]
}
expression: |
{
"order_id": order_id,
"customer_name": first_name & ' ' & last_name,
"address": address.city & ', ' & address.country,
"total_price": $sum(items.(quantity * price_per_unit))
}
Properties
expression *string
The JSONata expression to apply on the JSON object
from *string
The value to be transformed
Must be a valid JSON string.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150maxDepth integerstring
1000The maximum number of nested evaluation levels allowed for the JSONata expression
Bounds how deeply the expression may nest while it is evaluated, which is what caps runaway recursive functions. The limit depends only on the expression, never on how many records are processed: the default of 1000 is far above what ordinary expressions reach, and a batch of 1,000,000 records needs no higher a value than a batch of 10 does. Raise it only for expressions with proven deep recursion needs — each level adds frames to the chain traversed by variable lookup, so very high values trade the clean error for a JVM StackOverflowError.
Outputs
value object
The transformed value