ARRAY_CONTAINS

The ARRAY_CONTAINS function evaluates a column for a specific value and returns true if the value exists in a row and false if it does not.

ParameterType
array
array
element
any
Returns: array

Example

Arrays are currently only supported on tables from a live connection to an Athena database. You cannot use them with other databases or with tables derived from an Athena database.

query:

SELECT country_id,
       ARRAY_CONTAINS(cities, "London")
  FROM city_array

returns:

country_id array_contains
UK true
SG false
US false
CN false
CH false