Skip to main content

ROWS

Inject rows into a pipeline.

Syntax

ROWS expression

Parameters

  • expression - An expression that evaluates to an array-of-struct which defines the rows to inject

Description

The ROWS command injects rows into a pipeline by taking an array-of-struct expression and creating one row for each struct element. This is mostly used for examples or playgrounds and is rarely useful in real queries over larger datasets. The ROWS command is functionally equivalent to UNNEST of a literal array.

  • EXPLODE - Expand array fields into separate rows (similar row generation behavior)
  • UNNEST - Lift struct or array of struct fields into the parent or enclosing result set (functionally equivalent for literal arrays)