Parameter | Type |
---|---|
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_APPEND(cities, "foo")
FROM city_array
In the syntax of the command the array must be listed first followed by the appended value. `ARRAY_APPEND("foo", cities)` would not run.
results:
country_id | array_append |
---|---|
UK | London, Stretford, foo |
SG | Singapore, foo |
US | Southlake, South San Francisco, South Brunswick, Seattle, foo |
CN | Beijing, foo |
CH | Geneva, Bern, foo |