FlattenArrays Parameter (Connect-AmazonAthena Cmdlet)
By default, arrays are returned as strings of JSON. The FlattenArrays property can be used to flatten the elements of arrays into columns of their own. Set FlattenArrays to the number of elements you want to return from arrays.
Syntax
Connect-AmazonAthena -FlattenArrays int
Data Type
int
Default Value
0
Remarks
By default, arrays are returned as strings of JSON. The FlattenArrays property can be used to flatten the elements of arrays into columns of their own. This is only recommended for arrays that are expected to be short.
Set FlattenArrays to the number of elements you want to return from arrays. The specified elements are returned as columns. The zero-based index is concatenated to the column name. Other elements are ignored.
For example, you can return an arbitrary number of elements from an array of strings:
["FLOW-MATIC","LISP","COBOL"]When FlattenArrays is set to 1, the preceding array is flattened into the following table:
Column Name | Column Value |
languages.0 | FLOW-MATIC |
Setting FlattenArrays to -1 will flatten all the elements of arrays.