Array of rows overview

Because FeatureQL is entity based, the array of rows structure is very commonly used to represent collections of facts related to an entity.

FeatureQL has then strong support for arrays and arrays of rows.

OperationSyntaxDescriptionScope
Access rows<array_of_rows>[<index>] or <array_of_rows>[<start>:<end>]Extract one or a range of rows as an array of rowsrows
Access fields<array_of_rows>[<field1>, <field2>...]Extract fields from an array of rows as a array of values (one field) or an array of rows (many fields)fields
UnwrapUNWRAP(<array_of_rows>)Unwraps an array of one field rows as a array of values (convenient when the name of the field is not named)fields
ConcatenateARRAY_CONCAT(<array_of_rows1>, <array_of_rows2> (DEDUPLICATED ON <field1>, <field2>...))Concatenates the rows of the two arrays of rows, possibly deduplicated on one or many fields valuesrows
ZipZIP(<array_of_rows1>, <array_of_rows2>)Zips one or many arrays into an array of rowsfields
Merge (by positions)ARRAY_MERGE(<array_of_rows1>, <array_of_rows2>)Combines two or more arrays of rowsfields
Merge (by values)ARRAY_MERGE(<array_of_rows1>, <array_of_rows2> (JOINED ON <field1>, <field2>...))Merge the rows of two arrays of rows by joining on a fieldfields and rows
ExtendEXTEND(<array_of_rows> WITH <feature>)Adds features as fields to an array of rows by joining on an existing fieldfields
TransformTRANSFORM(<array_of_rows> WITH <subquery>)Applies transformations to an array of rows (map, filter, aggregate)fields and rows

You can see the full list of array of rows functions in the Functions page.

Create array of rows

Access fields and rows

Concatenate two arrays of rows

Zip and merge by position

@fql-playground(array_of_rows_zip_merge_by_positions)

Merge by value

Coming soon

This capability is not yet available.

Last update at: 2025/12/05 16:03:14
Last updated: 2025-12-05 16:07:55