table_unnest

A list column's items, one row each.

ConstructDeterministic

Flags

Flag Value
Kind construct: makes a value from values
Rows changes the rows
Deterministic yes
Order matters no
Decomposable yes
Makes a table value

Parameters

Parameter Type Required Notes
table reference yes A value's reference.
column integer yes at least 0. The list column's ordinal.
offset_column string no The name of an Int64 column of item positions (from 1), placed after the items.
keep_empty boolean no Keep a row whose list is empty or null, with a null item.
response_format "concise" | "detailed" no The byte budget: 64 KiB concise, 512 KiB detailed.

Example

Over the example tables orders; ${input:name} is an input's reference and ${verb} the value an earlier call made.

JSON
table_unnest {
  "table": "${input:orders}",
  "column": 8,
  "keep_empty": false
}

Result

342 rows

JSON
{
  "ref": "sha256:7c37647d6a77cbb2c709b1360e33fbcebd997d5480df0ccfbc9bc89c85067630",
  "kind": "table",
  "rows": 342,
  "schema": "…"
}

In the hint language

The same step as a plan, as the language prints it.

Hint
output out = from orders
unnest tags

Diagnostics

A refusal comes back as ok: false with coded diagnostics; every code, with its fix, is on the diagnostics page. A parameter that does not match the schema above is ARG_INVALID, with the parameter's path.