Skip to content

Custom JDBC Source Support

Okera provides the ability to specify custom JDBC drivers using the driver.jar.path and driver.class.name properties. Okera will try to download the JAR files on the fly for the first time from the valid driver.jar.path. This path/file, if in S3, should have appropriate IAM credentials allowing Okera to connect and download the file. For any other https:// path this file should be downloadable.

Note: This does not guarantee that Okera would support arbitrary JDBC drivers. The data type mapping can be undefined due to Okera not certifying those JDBC drivers. For example, Okera has certified that Oracle JDBC driver used as a custom driver is fully supported and documented for limitations and data type mapping.

Here is an example that adds a custom driver called mariadb:

CREATE DATACONNECTION mariadb_connection CXNPROPERTIES
(
  'connection_type'='JDBC',
  'jdbc_driver'='jdbc:mariadb',
  'host'='<host>',
  'port'='<port>',
  'user_key'='awsps:///my-username',
  'password_key'='awsps:///my-username',
  'jdbc.db.name'='<database to connect to>',
  'jdbc.schema.name'='<schema to connect to, if required>',
  'connection_properties'='{"driver.jar.path":"s3://okera-jdbc-test/drivers/mariadb-java-client-2.6.0.jar","driver.class.name":"org.mariadb.jdbc.Driver"}'
);