EXTRACT(...)

All functions > ARRAY OF ROWS > EXTRACT(...)

Returns the extracted fields from the given expression.

Syntax

base[ field, ... ]

Notes

  • Extracts one or more fields from a ROW or an array of rows
  • From a single ROW: one field returns a scalar; several return a small ROW
  • From an array of rows, the same applies to each element: one field yields a column of scalars; several fields yield a column of small ROWs
  • Reorder or rename in the list with AS where needed; the EXTRACT(...) call form is equivalent when a parenthesized call is required
  • NULL rows or missing fields yield NULL where appropriate
  • Operator / accessor form: base[field], base[f1, f2]; you can also write EXTRACT(base, …, fields, …) in expression position

Related Functions

See also

Examples

FeatureQL
SELECT
    f1 := (ARRAY[ROW(10 AS x, 20 AS y), ROW(30 AS x, 40 AS y)])[x] -- Project one field from an array of rows
;
Result
f1 ARRAY
[10, 30]

Last update at: 2026/05/26 17:22:09