GET_ITEM

Syntax

GET_ITEM( array, index )

Description

Returns the element with the index index from the array array. Index must be any integer. Indexes in an array begin with one. Returns the last item from the array if index is -1.

Argument types:

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

Return type: Depends on argument types

Example

GET_ITEM([array_field], 2)

Data source support

ClickHouse 21.8, PostgreSQL 9.3.

Previous
Next