Transform Unnest

Transform Unnest

Certified

Flatten array fields into records

Expand an array field into one record per element, optionally keeping the original fields.

yaml
type: io.kestra.plugin.transform.Unnest

Explode items into rows

yaml
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
Properties

Output field name

Field name used for the exploded element in each output record.

Input records

Ion list or struct to transform, or a storage URI pointing to an Ion file.

Array path

Path expression that resolves to the array to explode, such as items[] or payload.items[].

Defaulttrue

Keep original fields

Keeps the original record fields in the output row, excluding the exploded array field itself.

DefaultFAIL
Possible Values
FAILSKIPNULL

On error behavior

FAIL stops the task on unnest errors, SKIP drops the current record, and NULL emits the record with a null exploded field.

DefaultTEXT
Possible Values
TEXTBINARY

Output format

Experimental: TEXT or BINARY. Only transform tasks can read binary Ion. Use TEXT as the final step.

DefaultAUTO
Possible Values
AUTORECORDSSTORE

Output type

AUTO stores to internal storage when the input is a storage URI; otherwise it returns records.

Reference (ref) of the pluginDefaults to apply to this task.

Unnested records

JSON-safe records when output mode is RECORDS or AUTO resolves to RECORDS.

Stored Ion file URI

URI to the stored Ion file when output mode is STORE or AUTO resolves to STORE.