CData Python Connector for MongoDB

Build 25.0.9454

FlattenObjects

This property specifies whether the attributes of objects are flattened into separate columns.

Data Type

bool

Default Value

true

Remarks

Set FlattenObjects to true to flatten the properties of objects into individual columns. If set to false, nested properties can remain nested and can be returned as JSON strings.
The connector generates the column name by concatenating the property name with the object name, separated by a dot.

For example, you can flatten the nested objects below at connection time:

[
     { "grade": "A", "score": 2 },
     { "grade": "A", "score": 6 },
     { "grade": "A", "score": 10 },
     { "grade": "A", "score": 9 },
     { "grade": "B", "score": 14 }
]
When FlattenObjects is set to true and FlattenArrays is set to 1, the preceding array is flattened into the following table:

Column NameColumn Value
grades.0.gradeA
grades.0.score2

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9454