All Products
Search
Document Center

Hologres:SQL Workbench/J

Last Updated:May 21, 2024

This topic describes how to connect SQL Workbench/J to a Hologres instance. After SQL Workbench/J is connected to a Hologres instance, you can use SQL Workbench/J to analyze data in Hologres in a visualized manner.

Prerequisites

  • SQL Workbench/J is installed. For more information about the environment requirements of SQL Workbench/J and how to install dependencies, see the official documentation.

  • A Hologres instance is purchased. For more information, see Purchase a Hologres instance.

Background information

SQL Workbench/J is a free, cross-platform SQL query and analysis tool. You can use a PostgreSQL driver to connect SQL Workbench/J to a Hologres instance.

Procedure

  1. Start SQL Workbench/J and establish a connection to a Hologres instance.

  2. Configure connection parameters.

    The following table describes the connection parameters.

    Parameter

    Description

    Example

    Driver

    PostgreSQL

    The PostgreSQL driver is used to connect to the Hologres instance.

    None.

    URL

    jdbc:postgresql://endpoint:port/database

    • Endpoint: the public endpoint of the Hologres instance.

      You can view the endpoint of the Hologres instance in the Network Information section of the Instance Details page in the Hologres console.

    • Port: the public port number of the Hologres instance.

      You can view the public port number of the Hologres instance in the Network Information section of the Instance Details page in the Hologres console.

    • Database: the name of the Hologres database to which you want to connect.

    jdbc:postgresql://holodemo-cn-hangzhou.aliyun.com:80/postgres

    This value is only for reference.

    Username

    The AccessKey ID of your account that is used to access the Hologres instance.

    You can obtain the AccessKey ID from the Security Management page.

    None.

    Password

    The AccessKey secret of your account that is used to access the Hologres instance.

    You can obtain the AccessKey secret from the Security Management page.

    None.

  3. Configure extended properties.

    1. Click Extended Properties. In the Edit extended properties dialog box, set SSL to true.

    2. Click OK.

  4. Click OK. SQL Workbench/J is connected to the Hologres instance.

    You can query and analyze data in the Hologres instance in SQL Workbench/J. For more information about how to configure the driver and install SQL Workbench/J, see SQL Workbench/J documentation.