SQL Workbench/J

更新时间:
复制 MD 格式

This topic describes how to connect SQL Workbench/J to Hologres for visual data analysis.

Prerequisites

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

  1. Start SQL Workbench/J and create a new connection.

  2. 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 format jdbc: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/postgres

    This 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

  3. Set the extended properties.

    1. Click Extended properties and set the SSL property to true.

    2. Click OK.

  4. 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.