Ready to get started?

Learn more about the CData JDBC Driver for JSON or download a free trial:

Download Now

Connect to JSON Services in Aqua Data Studio

Access JSON services from tools in Aqua Data Studio such as the Visual Query Builder and the Table Data Editor.

The CData JDBC Driver for JSON integrates JSON services with wizards and analytics in IDEs like Aqua Data Studio. This article shows how to connect to JSON services through the connection manager and execute queries.

Create a JDBC Data Source

You can use the connection manager to define connection properties and save them in a new JDBC data source. The JSON data source can then be accessed from Aqua Data Studio tools.

  1. In Aqua Data Studio, select Register Server from the Servers menu.
  2. In the Register Server form, select the 'Generic - JDBC' connection.
  3. Enter the following JDBC connection properties:
    • Name: Enter a name for the data source; for example, JSON.
    • Driver Location: Click the Browse button and select the cdata.jdbc.json.jar file, located in the lib subfolder of the installation directory.
    • Driver: Enter the Driver's class name, cdata.jdbc.json.JSONDriver.
    • URL: Enter the JDBC URL, which starts with jdbc:json: and is followed by a semicolon-separated list of connection properties.

      See the Getting Started chapter in the data provider documentation to authenticate to your data source: The data provider models JSON APIs as bidirectional database tables and JSON files as read-only views (local files, files stored on popular cloud services, and FTP servers). The major authentication schemes are supported, including HTTP Basic, Digest, NTLM, OAuth, and FTP. See the Getting Started chapter in the data provider documentation for authentication guides.

      After setting the URI and providing any authentication values, set DataModel to more closely match the data representation to the structure of your data.

      The DataModel property is the controlling property over how your data is represented into tables and toggles the following basic configurations.

      • Document (default): Model a top-level, document view of your JSON data. The data provider returns nested elements as aggregates of data.
      • FlattenedDocuments: Implicitly join nested documents and their parents into a single table.
      • Relational: Return individual, related tables from hierarchical data. The tables contain a primary key and a foreign key that links to the parent document.

      See the Modeling JSON Data chapter for more information on configuring the relational representation. You will also find the sample data used in the following examples. The data includes entries for people, the cars they own, and various maintenance services performed on those cars.

      Built-in Connection String Designer

      For assistance in constructing the JDBC URL, use the connection string designer built into the JSON JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.

      java -jar cdata.jdbc.json.jar

      Fill in the connection properties and copy the connection string to the clipboard.

      A typical JDBC URL is below:

      jdbc:json:URI=C:\people.json;DataModel=Relational;

Query JSON Services

You can now query the tables exposed.