This topic describes how to connect SQL Workbench/J to Hologres for visual data analysis.
Prerequisites
-
SQL Workbench/J is installed.
-
Activate a Hologres instance. For more information, see Purchase a Hologres instance.
Background
SQL Workbench/J is a free, cross-platform SQL query and analysis tool. You can use the PostgreSQL driver to connect to Hologres for data development.
Procedure
-
Start SQL Workbench/J and create a new connection.
-
Configure the connection parameters. In the Select Connection Profile dialog box, select
PostgreSQL (org.postgresql.Driver)for Driver. In the URL field, enter the JDBC connection string for your Hologres instance in the formatjdbc:postgresql://<instance ID>-cn-shanghai.hologres.aliyuncs.com:80/postgres. Enter your Username and Password, and then select the Autocommit checkbox.The following table describes the connection parameters.
Parameter
Description
Example
Driver
Use the PostgreSQL driver to connect to Hologres.
N/A
URL
jdbc:postgresql://endpoint:port/database-
The public endpoint of the Hologres instance.
Go to the instance details page on the Hologres console. You can find the endpoint on the Network Information tab.
-
The public port of the Hologres instance.
Go to the instance details page on the Hologres console. You can find the port on the Network Information tab.
-
The name of the Hologres database to connect to.
Go to the instance details page on the Hologres console. You can find the database name under Database Management.
jdbc:postgresql://holodemo-cn-hangzhou.aliyun.com:80/postgresThis value is for reference only. Replace it with your actual parameters.
Username
The AccessKey ID of your account.
Click AccessKey Management to obtain your AccessKey ID and secret.
N/A
Password
The AccessKey secret of your account.
N/A
-
-
Set the extended properties.
-
Click Extended properties and set the SSL property to true.
-
Click OK.
-
-
Click OK. SQL Workbench/J is connected to the Hologres instance.
You can now use SQL Workbench/J to query and analyze data in Hologres.