Explode / Array Layer

Convert fixed-length array elements into separate rows. Similar to Polars explode(), pandas explode(), or SQL UNNEST. Creates a new row for each array element, duplicating all other column values.

Example transformation (arrays of length 3):

Input:

idvalues
1[10, 20, 30]
2[40, 50, 60]

Output:

idvalue
110
120
130
240
250
260

Common applications:

  • Normalizing nested data
  • Analyzing array elements individually
  • Converting arrays to rows
  • Time series decomposition
  • Tag expansion

Note: Arrays must have the same fixed length across all rows. Null arrays or arrays containing null values produce null rows.

Table
0
0
Table

Select

column

The fixed-length array column to explode. Supports various array types:

  • Numeric arrays: [1, 2, 3]
  • String arrays: [a, b, c]
  • Date arrays: [2024-01-01, 2024-01-02, 2024-01-03] All arrays must have the same length. Mixed types not supported.

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.