The ArrayAgg function identifies non-null row values in a column or group and aggregates them into a single array.

πŸ“˜

This function is currently supported by AlloyDB, BigQuery, Databricks, PostgreSQL and Snowflake connections.

Syntax

ArrayAgg(value)

Function argument:

value(required) The column containing values to join.

Example

ArrayAgg([County Name])

For each grouping (grouped by state name) the ArrayAgg function returns an array containing non-null values from the corresponding rows in the County Name column.

Table showing counties grouped by state name, with a column aggregating all county names for each state using the ArrayAgg function.


Related resources