Skip to content

PostgreSQL Data Source Connections

You can use any supported version of Aurora PosgreSQL with Okera. Okera has tested its PostgreSQL support using the following PostgreSQL versions: 9.5.25, 9.6.22, 10.14, 11.2, and 12.7.

Here is a programmatic example of a PostgreSQL connection.

CREATE DATACONNECTION psql_connection CXNPROPERTIES
(
  'connection_type'='JDBC',
  'jdbc_driver'='postgresql',
  'host'='<A cloud url or host accessible from the application>',
  'port'='<Port to connect to the DB, typically 5432>',
  'user_key'='awssm://my-username',
  'password_key'='awssm://my-password',
  'jdbc.db.name'='dev',
  'jdbc.schema.name'='public',
  'connection_properties'='{"ssl":"true","sslrootcert":"s3://rds-downloads/rds-ca-2019-root.pem"}'
);

Note: sslrootcert is required if ssl is set to true

Enable Query Pushdown

To enable transparent query pushdown, add postgresql to the list of enabled engines in the OKERA_CTE_REWRITE_ENABLED_ENGINES configuration setting. Multiple engines can be enabled (in addition to the ones enabled by default) by providing them as comma-separated values in this configuration setting.

For example:

OKERA_CTE_REWRITE_ENABLED_ENGINES: dremio:direct,redshift,postgresql