Reshapes
← Relifold documentation

Flatten

Explode one list-valued field into rows.

Flatten emits one row per element of a list-valued field while preserving the other fields.

Worked example

Flatten(
    name="one-click-per-row",
    input_spaces=("user-histories",),
    output_space="clicks",
    field="recent_history",
    key="click_id",
)
ParameterDefaultMeaning
input_spacesrequiredThe Space or Spaces read by the reshape.
namerequiredA stable node name shown in the pipeline and session.
output_spacerequiredThe Space receiving exploded rows.
fieldrequiredThe list-valued field to explode.
keyidName of the generated row-identity field.

Output

One row per list element. Scalar values pass through as one row.