Dynamic Drivers

Dynamic Drivers

Overview

Prior to the addition of Dynamic Drivers, the Dashboard shipped with all of the JDBC Drivers required for the data source we explicitly support; however, most installations will only ever use a small subset of these drivers some of which are quite large or require numerous other JAR files to be present alongside them. Moving drivers to being dynamically controlled means they will instead be pulled in only if they are required due to a Data Connection of that data source being configured within the Dashboard. Dynamic drivers will be downloaded, verified via SHA 256 comparison, written to the ‘Dashboard/tomcat/dynamic_drivers’ directory, and loaded into the application for immediate use.

List of Dynamic Drivers

As of the latest release, the following drivers have been moved to this dynamic functionality:

  • Athena

  • ClickHouse

  • SQLite

Configuration

As an example, the configuration details for the Clickhouse Driver is the following JSON object within the ‘Dashboard/tomcat/dynamic_drivers/drivers.json’ file :

{ "name": "ClickHouse", "driverClassPath": "com.clickhouse.jdbc.ClickHouseDriver", "version": "0.6.2", "files": [ { "fileName": "clickhouse-jdbc-0.6.2-all.jar", "downloadUrl": "<https://repo1.maven.org/maven2/com/clickhouse/clickhouse-jdbc/0.6.2/clickhouse-jdbc-0.6.2-all.jar>", "sha256": "e86a43d00fc27251cb327bf3cda5b6d3b0586ffaeb231a83466d0b64b45dccd2" }, { "fileName": "lz4-java-1.8.0.jar", "downloadUrl": "<https://repo1.maven.org/maven2/org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar>", "sha256": "d74a3334fb35195009b338a951f918203d6bbca3d1d359033dc33edd1cadc9ef" } ] },

The intent behind this functionality at the moment is for it to be ‘hands-off’ from your perspective. However, aspects of this functionality is driven by the configuration file mentioned above meaning there is some scope for modification if you find you need it:

  • You could change the source of these downloads (and the SHA256) if for some reason you want to retain the dynamic functionality but have a preferred source for the driver

  • You could update the version - note Dashboard compatibility is not guaranteed if doing this

  • You could add to the ‘files’ section if you want to add support for certain features of that driver that require other JARs to be available

  • You could remove one or more drivers from dynamic control by removing the corresponding entry in this file