Table of contents

GetArrayElements (Azure Stream Analytics)

Mary McCready|Last Updated: 8/14/2018
|
3 Contributors

Returns a dataset with array values and indexes. The result of the GetArrayElements function must be used with CROSS APPLY operator only. This function is useful for parsing arrays and nested objects in JSON and AVRO formatted input event data. For more examples, see Parsing JSON and AVRO data.

Syntax

GetArrayElements ( column_reference )  

Arguments

column_reference

Is the column reference expression to be evaluated. Column must be of type Array.

Return Types

Returns a dataset with ArrayIndex and ArrayValue columns.

Examples

SELECT   
    arrayElement.ArrayIndex,  
    arrayElement.ArrayValue  
FROM input as event  
CROSS APPLY GetArrayElements(event.arrayField) AS arrayElement  

See also

© 2018 Microsoft