DataModel
Specifies the data model to use when parsing Elasticsearch documents and generating the database metadata.
Possible Values
Document, FlattenedDocuments, RelationalData Type
string
Default Value
"Document"
Remarks
Select a DataModel configuration to configure how the add-in models nested documents into tables. See Parsing Hierarchical Data for examples of querying the data in the different configurations.
Selecting a Data Modeling Strategy
The following DataModel configurations are available. See Parsing Hierarchical Data for examples of querying the data in the different configurations.
-
Document
Returns a single table representing a row for each document. In this data model, any nested documents will not be flattened and will be returned as aggregates.
-
FlattenedDocuments
Returns a single table representing a JOIN of the parent and nested documents. In this data model, nested documents will act in the same manner as a SQL JOIN. Additionally, nested sibling documents (nested documents at same height), will be treated as a SQL CROSS JOIN. The add-in will identify the nested documents available by parsing the returned document.
-
Relational
Returns multiple tables, one for each nested document (including the parent document) in the document. In this data model, any nested documents will be returned as relational tables that contain a primary key and a foreign key that links to the parent table.
See Also
- FlattenArrays and FlattenObjects: Customize the columns that will be identified for each of these data models. See Automatic Schema Discovery for examples of using these properties.
- Parsing Hierarchical Data: Compare the schemas resulting from different DataModel settings, with example queries.
- Searching with SQL: Learn about the data modeling and flattening techniques available in the add-in.