Connecting to SQLWorkbench/J¶
A popular tool is the free SQLWorkbench/J, which is written in Java and requires a working Java runtime to be installed. You then download the SQLWorkbench/J archive as a single file and unpack it into a place of our choice.
Once started, it presents the main window and also opens the "Select Connection Profile" dialog so that you can set up a first database connection:
The first step is to provide a driver JAR file so that SQLWorkbench/J can connect to it via JDBC. Okera suggests to its own Presto driver JAR file, as it adds additional options (see below). You can download the driver file from the following URL:
https://okera-release-useast.s3.amazonaws.com/1.5.0/client/presto-jdbc-0.214.jar
In the "Select Connection Profile" dialog, click on the "Manage Drivers" button at the bottom left.
Then click on the "New Driver" button (the white paper icon) at the top left and enter a new name for the driver, for example, Okera
.
Next click on the "File Open" button (the yellow folder with green arrow icon) at the right side and select the location and JAR file of the Presto driver you downloaded.
Ensure that the "Classname" is set to com.facebook.presto.jdbc.PrestoDriver
and click on the "OK" button:
Back in the "Select Connection Profile" dialog, enter a name for the connection in the main field, for example, ODAS Cluster
.
Select the newly created driver, for instance, Okera
from the dropdown list, and paste the JDBC connection URL as copied from the ODAS cluster WebUI (see Endpoint Information).
Also enter a username and password from your corporate directory service.
Note
You need to check the "Autocommit" box underneath the "Password" field, or else SQLWorkbench/J will report pending transaction errors.
Finally, click on the "Extended Properties" button and create a new property SSL
with the value true
by clicking on the "New Property" button (the white paper icon at the top left of the dialog), then click the "OK" button:
If all is correct, you can, for example, use the "Tools - Show Database Explorer" to browse the ODAS managed datasets and look at the data:
SQLWorkbench/J with Self-Signed Certificates¶
As explained for DBeaver earlier, the above will work as-is with ODAS clusters using properly signed TLS/SSL certificates. For non-production cluster it may be that self-signed certificates are used for the sake of simplicity (ODAS can automatically create those).
Note
Okera strongly advises all users of the software to install a properly signed and company managed certificate. Not doing so effectively disables the SSL check and leaves the connection vulnerable for possible exploits.
In that case, you need to add the same extra property to the connection to ignore errors when the self-signed certificate is validated.
Select the "Open - Connect window" menu and select the ODAS Cluster
connection.
Click on the "Extended Properties" button again and add the property named SSLAllowSelfSignedCert
with the value of true
, then click the "OK" button for this and the main dialog to accept the change:
After that SQLWorkbench/J will be able to work with cluster using self-signed certificates.