JDBC


JDBC


This page outlines the steps to use the JDBC driver for CData Connect Cloud.

Note: Before you can configure and use JDBC with CData Connect Cloud, you must first connect a data source to your CData Connect Cloud account. See Connections for more information.

Install the Driver

Follow these steps to download and install the Driver:

  1. Open the Client Tools page of CData Connect Cloud.

  2. In the Dev Tools section, click JDBC.

  3. Download and run the setup file.

Creating a JDBC Data Source

Follow these steps to create a JDBC data source to connect to CData Connect Cloud from your Java application:

  1. Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the JDBC driver for CData Connect Cloud installation directory.
    Note: The .lic file must be located in the same folder as the JAR file.

  2. Some applications automatically populate the driver class. For applications that do not automatically populate it, you must enter it manually. For example:

    cdata.jdbc.connect.ConnectDriver
    
  3. Provide the JDBC URL. For example:

    jdbc:connect:AuthScheme=OAuth;
    

    or

    jdbc:cdata:connect:AuthScheme=OAuth;
    

    The second format above can be used to ensure you are using the CData driver whenever there is a conflict in your application between drivers using the same URL format. The URL must start with either jdbc:connect: or jdbc:cdata:connect:, and it must only include the AuthScheme setting as OAuth.

Connect to CData Connect Cloud

There are two ways to connect to CData Connect Cloud through the JDBC driver: OAuth authentication and Basic authentication.

To connect to CData Connect Cloud using OAuth, set the AuthScheme in your JDBC connection as OAuth. If the OAuth login page appears in your default web browser, log in to CData Connect Cloud to proceed.

If you are unable to use browser-based OAuth authentication to connect to CData Connect Cloud, you can use Basic authentication. In this case, set the AuthScheme in your JDBC connection to Basic, and then set the User and Personal Access Token for CData Connect Cloud.

Connect to a Workspace

To connect the JDBC client to a specific workspace, you specify the workspace name in the Advanced tab of the JDBC driver for CData Connect Cloud.

Learn More

To learn more information about using the JDBC driver for CData Connect Cloud, click here.