Manually Adding a JDBC Driver
Spectrum Technology Platform can access data from any database using a JDBC driver. Drivers for SQL, Oracle, and PostgreSQL are provided with the Spectrum Data Federation, which also includes drivers for other types of databases. If Spectrum Technology Platform does not come with a driver for the type of database you need, you can add a JDBC driver.
In this procedure you will add JDBC driver files to the server then manually define the connection string and connection properties. Before you begin, be sure that you understand the connection string format and properties required by the driver. You must define these accurately in order for the driver to function. You can typically find information about a driver's connection string and properties from the driver provider's website.
- Open Spectrum Management Console.
- Go to .
- Click the Add button .
- In the Name field, enter a name for the driver. The name can be anything you choose.
-
In the JDBC driver class name field, enter the Java
class name of the driver. You can typically find the class name in your JDBC
driver's documentation.
For example, to use the Microsoft JDBC driver, you might enter the following:
com.microsoft.sqlserver.jdbc.SQLServerDriver
-
In the Connection string template field, enter the JDBC
connection URL to use to connect to the database, including any properties you
want to set in the connection string. Different database vendors use different
connection strings so check your database's documentation for more information
about the connection string.
If the driver will be used by more than one database connection, consider using property tokens in the connection string instead of hard-coding property values that may be different for each connection. For example, if you want to have some connections use encryption and others not, you may want to define a property token for the encryption property.
To use a property token in the connection string, use this syntax:
${PropertyToken}
Any property tokens you include in the connection string template will be required fields when defining a database connection.
Note: Use the property token name ${password} for the property that will contain the database password. By using this token name, the password will be masked in the field in Spectrum Management Console and will be encrypted in the database.For example, this connection string for SQL contains property tokens for host, port, instance, and encryption:
jdbc:sqlserver://${host}:${port};databaseName=${instance};encrypt=${encryption};TrustServerCertificate=true
These tokens are required fields when defining a database connection that uses this driver:
-
If there are properties that you want to make optional for database
connections, define them in the Connection Properties
section.
- In the Connection properties section, click the Add button .
- In the Label field, enter a user-friendly description of the property. The label you enter here is used as the field label in the connections window when creating a connection using this driver.
- In the Property token field, enter the token for the optional property. See the database driver's documentation for the properties supported by the driver.
Note: Use the property token name password for the property that will contain the database password. By using this token name, the password will be masked in the field in Spectrum Management Console and will be encrypted in the database.For example, if you want to make encryption optional for database connections that use this driver, you could define the encryption property like this:
When a database connection uses this driver, the encryption property would be displayed as an optional property in the database connection:
- Log in to the server running Spectrum Technology Platform and place the database driver file in a folder on the server. The location does not matter.
- In the Driver files section, click the Add button .
- In the File path field, enter the path to the database driver file on the server.
- Click Save.