Establishing a Connection
Creating a JDBC Data Source
You can create a JDBC data source to connect from your Java application, based on CData JDBC Driver for API.Follow these steps:
- Add the driver JAR file to the classpath. The JAR file is located in the installation directory's lib subfolder. Ensure that the .lic file is located in the same folder as the JAR file.
- Provide the driver class. For example:
cdata.jdbc.api.APIDriver
- Provide the JDBC URL. For example:
jdbc:api:Profile=<Path to Profile>;ProfileSettings=<Profile Configuration Settings>
Or, if there is a conflict in your application between drivers using the same URL format, use this form to ensure that you are using the CData driver:
jdbc:cdata:api:Profile=<Path to Profile>;ProfileSettings=<Profile Configuration Settings>
Ensure that the URL starts with either jdbc:api: or jdbc:cdata:api:. The URL can include any of the connection properties in name-value pairs separated with semicolons.
The CData JDBC Driver for API can be used to connect to a variety of data sources from within your application.
Connecting to Profiles
The driver can be used to connect to a variety of data sources, called Profiles, from within your application. An API profile is a collection of schemas modeling data from an application or online service as tables, views or stored procedures. API Profile files have the file exension ".apip" and can be download from the CData website.
To establish a connection using a Profile, set the Profile property to the path of the API profile file, and ProfileSettings to a connection string containing the credentials to the data-source. The most common forms of authentication are supported, including HTTP basic, HTTP digest, NTLM, and OAuth. For more information on the required connection properties, please refer to the documentation of each profile.