FlattenObjects Parameter (Connect-HarperDB Cmdlet)
Set FlattenObjects to true to flatten object properties into columns of their own. Otherwise, nested objects are returned as strings of JSON.
Syntax
Connect-HarperDB -FlattenObjects SwitchParameter
Data Type
bool
Default Value
false
Remarks
Without FlattenObjects set, embedded documents are returned as strings of JSON. Set FlattenObjects to true to flatten object properties into columns of their own. The property name is concatenated onto the object name with a period to generate the column name.
For example, you can flatten the nested objects below at connection time:
"manager": { "name": "Alice White", "age": 30 }When FlattenObjects is set to true, the preceding object is flattened into the following table:
Column Name | Column Value |
manager.name | Alice White |
manager.age | 30 |
For further examples of schema discovery and flattening objects, please see Automatic Schema Discovery.