FlattenObjects
Specifies whether nested object properties are flattened into individual columns.
Data Type
bool
Default Value
true
Remarks
When this property is set to true, object properties are extracted as separate columns. When it is set to false, nested objects within arrays are represented as JSON-formatted strings. Flattening nested objects into individual columns simplifies working with structured data. When enabled, the provider appends the property name to the parent object name to generate column names. This is useful for tabularizing predictable and manageable object structures.
For deeply nested or large JSON objects, consider the performance implications of flattening, as excessive flattening may create an unmanageable number of columns. For objects with unpredictable properties or varying schemas, leaving this property disabled may provide a more flexible representation.
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 Name | Column Value |
| grades_0_grade | A |
| grades_0_score | 2 |