Skip to content

Oracle

Programmatic Example

In order to connect to Oracle, you will need to provide a custom licensed Oracle JDBC driver. You can specify the driver.jar.path and driver.class.name properties. Okera will try to download the jars on the fly for the first time from the valid driver.jar.path. This path/file, if in S3, should have appropriate IAM credentials for Okera to connect and download the file. For any other https:// path this file should be downloadable.

Once you've uploaded the custom Oracle driver, you can create a connection to your Oracle DB.

CREATE DATACONNECTION oracle_connection CXNPROPERTIES
(
  'connection_type'='JDBC',
  'jdbc_driver'='oracle:thin',
  'host'='<Oracle host to connect to>',
  'port'='<Oracle port to connect to, typically 1521',
  'user_key'='awssm://my-username',
  'password_key'='awssm://my-password',
  'jdbc.db.name'='<default db>',
  'connection_properties'='{"driver.jar.path":"s3://path/to/ojdbc8.jar","driver.class.name":"oracle.jdbc.driver.OracleDriver"}'
);