JDBC Driver for JSON

Build 22.0.8462

DataModel

Specifies the data model to use when parsing JSON documents and generating the database metadata.

Possible Values

Document, FlattenedDocuments, Relational

Data Type

string

Default Value

"Document"

Remarks

The driver splits JSON documents into rows based on the objects nested in arrays. Select a DataModel configuration to configure how the driver models nested object arrays 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 top-level object. In this data model, any nested object arrays will not be flattened and will be returned as aggregates. Unless an JSONPath value is explicitly specified, the driver will identify and use the top-most object array found as the XPath.

  • FlattenedDocuments

    Returns a single table representing a JOIN of the available documents in the file. In this data model, nested JSONPath values will act in the same manner as a SQL JOIN. Additionally, nested sibling JSONPath values (child paths at the same height), will be treated as a SQL CROSS JOIN. Unless explicitly specified, the driver will identify the JSONPath values available by parsing the file and identifying the available documents, including nested documents.

  • Relational

    Returns multiple tables, one for each JSONPath value specified. In this data model, any nested documents (object arrays) will be returned as relational tables that contain a primary key and a foreign key that links to the parent table. Unless explicitly specified, the driver will identify the JSONPath values available by parsing the file and identifying the available documents (including nested documents).

See Also

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