UNNEST

    Syntax

    UNNEST( array )
    

    Description

    Expands the array array expression to a set of rows.

    Argument types:

    • arrayArray of fractional numbers | Array of integers | Array of strings

    Return type: Depends on argument types

    Note

    PostgreSQL doesn't allow filtering fields containing the UNNEST function. If the data source is PostgreSQL, do not use such fields in selectors.

    Example

    Source data

    City Category
    'Moscow' ['Office Supplies', 'Furniture']
    'London' ['Office Supplies']

    Result

    [City] UNNEST([Category])
    'Moscow' 'Office Supplies'
    'Moscow' 'Furniture'
    'London' 'Office Supplies'

    Data source support

    ClickHouse 19.13, PostgreSQL 9.3.