13.2.2 Support to arrays in queries

The Gaia DR2 data model defines some fields as arrays. This is not easily handled into standard ADQL. The Gaia Archive has therefore implemented some functions to allow basic operations with arrays within ADQL. Some examples are:

  • array_element(array,index) and array_element(array, index1, index2): overloaded function that allows the extraction of one element from a one-dimensional or a two-dimensional array;

  • array_dims(array): function that allows to obtain the dimensions of an array;

  • array_length(array, index): allows to extract the length of an array.

See https://www.cosmos.esa.int/web/gaia-users/archive/help for details.