Skip to main content

Semi-Structured Data

Function NameDescription
ARRAY_AVGReturns the average of all non-null elements of a list.
ARRAY_CATReturns a concatenation of two arrays.
ARRAY_COMPACTReturns the input array without null values.
ARRAY_CONTAINSReturns whether a list contains a given value.
ARRAY_GENERATE_RANGEReturns an array of integers in the specified range.
ARRAY_MAXReturns the maximum value of a list.
ARRAY_MINReturns the minimum value of a list.
ARRAY_POSITIONReturns the index of the first occurrence of an element in an array.
ARRAY_REMOVERemoves all elements that equal a given value from a list.
ARRAY_REMOVE_ATReturns the input array with the element at the specified position removed.
ARRAY_SIZEReturns the size of the input array.
ARRAY_SUMReturns the sum of all non-null elements of a list.
CARDINALITYReturns the number of elements contained in the specified list or map.
FLATTENExplodes compound values into multiple rows. This function takes a LIST column and produces a lateral view (that is, an inline view that contains correlation referring to other tables that precede it in the FROM clause).
MAP_KEYSReturns all keys from a map expression.
MAP_VALUESReturns all values from a map expression.