This section refers to the necessary steps or conditions you must fulfill before setting up a JDBC (Java Database Connectivity) connection. These are the required tools, configurations, or settings to ensure that the JDBC connection works smoothly. The key prerequisites for JDBC include:
-
Verify the agent to which you want to upload the driver is healthy and all services are running.
-
Locate the custom-jdbc-connector which should be up and running.
-
To establish JDBC connectivity, the custom driver bundle must be a
.zip/.tar/.gzipfile containing the following:-
The JDBC driver JAR files.
- A driver.properties configuration file. When
setting up your configuration, you can now choose between two formats
that are the legacy single-file format and the new modular
structure.
-
Legacy single-file format: In this format, the file must specify the driver display name and driver class name for your JDBC driver. Below are the driver properties utilized for configuration, of which certain properties are mandatory.
- driver.display.name=My Awesome Driver
- driver.class.name=com.example.jdbc.Driver
- driver.assetpath.database.exists=true
- driver.sample.query=<query>
- driver.assetpath.schema.exists
-
New modular structure: In this format, you must manually create these folders and place the corresponding files in them. Here’s how you can structure it:
- bundle/driver.properties folder -
Includes core driver settings:
- driver.display.name
- driver.class.name
- driver.database.property
- driver.url.custom.params
- driver.assetpath.database.exists
- driver.assetpath.schema.exists
- driver.typemappings.filename
- driver.auto.append.querytimeout.enable
- driver.skip.auto.append.querytimeout.connection.types
- query/driver.properties folder –
Handles query-related logic and metadata:
- driver.sample.query
- file:/C:/DITAToo/Workspace/DISuite/Untitled2.dita
- driver.freshness.query
- driver.partitioning.query.cardinality
- driver.partitioning.query.distinct
- driver.partitioning.query.minmax
- driver.partitioning.query.count
- driver.partitioning.hash.function
- driver.partitioning.concat.pattern
- driver.partitioning.rownumber.expression
- driver.partitioning.cast.nonstring.pattern
- dialect/driver.properties folder –
Manages SQL dialect and replication-friendly query
generation:
- driver.dialect.classname
- driver.dialect.delegate.classname
- driver.dialect.delegate.urls
Important: This modular setup improves clarity and maintainability, while the legacy single-file structure is retained for backward compatibility. - bundle/driver.properties folder -
Includes core driver settings:
-
-