JDBC Driver for Cloudant

Build 22.0.8462


Set FlattenArrays to the number of array elements to flatten into columns. Otherwise, arrays are returned as JSON strings.

Data Type


Default Value



By default, nested arrays are returned as strings of JSON. The FlattenArrays property can be used to flatten the elements of nested arrays into columns of their own: Set FlattenArrays to the number of elements you want to return from nested arrays. The zero-based index is concatenated to the column name with a dot or the character specified by SeparatorCharacter. Other elements are ignored.

For example, you can return an arbitrary number of elements from an array of strings:

When FlattenArrays is set to 1, the preceding array is flattened into the following table:

Column NameColumn Value

Setting FlattenArrays to -1 will flatten all the elements of nested arrays.

Using FlattenArrays is only recommended for arrays that are expected to be short. See NoSQL Database for other ways to access nested arrays.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462