Ready to get started?

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

Download Now

Connect to REST Data in Aqua Data Studio

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

The CData JDBC Driver for REST integrates REST data with wizards and analytics in IDEs like Aqua Data Studio. This article shows how to connect to REST data 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 REST 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, REST.
    • Driver Location: Click the Browse button and select the cdata.jdbc.rest.jar file, located in the lib subfolder of the installation directory.
    • Driver: Enter the Driver's class name, cdata.jdbc.rest.RESTDriver.
    • URL: Enter the JDBC URL, which starts with jdbc:rest: and is followed by a semicolon-separated list of connection properties. You will find information on the required connection string options in the help documentation. A typical JDBC URL is below:

      jdbc:rest:DataModel=Relational;URI=C:\people.xml;Format=XML;
  4. See the Getting Started chapter in the data provider documentation to authenticate to your data source: The data provider models REST APIs as bidirectional database tables and XML/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 Format to "XML" or "JSON" and 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 REST 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 REST 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.

Query REST Data

You can now query the tables exposed.

 
 
ダウンロード