
Transform Unnest
CertifiedFlatten array fields into records
Transform Unnest
Flatten array fields into records
Expand an array field into one record per element, optionally keeping the original fields.
type: io.kestra.plugin.transform.UnnestExamples
Explode items into rows
id: unnest_items
namespace: company.team
tasks:
- id: fetch
type: io.kestra.plugin.core.output.OutputValues
values:
records:
- order_id: o1
items:
- sku: a
- sku: b
- id: unnest
type: io.kestra.plugin.transform.Unnest
from: "{{ outputs.fetch.values.records }}"
path: items[]
as: item
keepOriginalFields: true
onError: FAIL
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-transform-records --compatible-for $KESTRA_VERSION For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
Properties
as *string
Output field name
Field name used for the exploded element in each output record.
from *object
Input records
Ion list or struct to transform, or a storage URI pointing to an Ion file.
path *string
Array path
Path expression that resolves to the array to explode, such as items[] or payload.items[].
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
{}1150keepOriginalFields booleanstring
trueKeep original fields
Keeps the original record fields in the output row, excluding the exploded array field itself.
onError string
FAILFAILSKIPNULLOn error behavior
FAIL stops the task on unnest errors, SKIP drops the current record, and NULL emits the record with a null exploded field.
outputFormat string
TEXTTEXTBINARYOutput format
Experimental: TEXT or BINARY. Only transform tasks can read binary Ion. Use TEXT as the final step.
outputType string
AUTOAUTORECORDSSTOREOutput type
AUTO stores to internal storage when the input is a storage URI; otherwise it returns records.
Outputs
records array
Unnested records
JSON-safe records when output mode is RECORDS or AUTO resolves to RECORDS.
uri string
Stored Ion file URI
URI to the stored Ion file when output mode is STORE or AUTO resolves to STORE.