UNWRAP

All functions > ARRAY_OF_ROWS > UNWRAP

Returns the first field values from an array of single-field rows as a simple array.

Syntax

UNWRAP(array: ARRAY<ROW<T>>) → ARRAY<T>
sql

Type Parameters:

  • T: Any type - the type of the single field in the row

Arguments

ParameterTypeRequiredDescription
arrayARRAY<ROW<T>>YesArray of single-field rows

Returns

ARRAY - Simple array of field values

Notes

  • Extracts the first field from each row in the array
  • Only works with arrays of rows that have exactly one field
  • Throws error if rows have multiple fields
  • Useful for converting aggregation results to simple arrays

Examples

Last update at: 2025/10/13 10:23:46