DataGrip is a multi-engine database tool that lets you manage multiple databases from a single application.
Prerequisites
-
You have installed the DataGrip client. If not, download it from the official DataGrip website. This topic uses DataGrip version 2024.2.1 as an example.
-
You have purchased a Hologres instance and created a database. For more information, see Purchase a Hologres instance and Create a database.
-
You have enabled public network access for the Hologres instance. For more information, see Instance Details.
Procedure
-
Open the DataGrip client. In the Database Explorer tool window, click the
icon. -
Select Data Source > PostgreSQL.
-
In the Data Sources and Drivers dialog box, configure the connection parameters.
Note-
If a
missing driver filesmessage appears, click Download to obtain the required driver. -
For some earlier versions of the DataGrip client, on the Options tab, go to the Introspection section and select the Introspect using JDBC metadata checkbox.
Parameter
Description
Example
Name
A custom name for the data source connection.
N/A
Host
The public network endpoint of the Hologres instance. You can find this on the Instance Details page on the Hologres console, within the Network Information section.
holodemo-cn-hangzhou.hologres.aliyuncs.com
Port
The public network port of the Hologres instance. You can find this on the Instance Details page on the Hologres console, within the Network Information section.
80
Authentication
The authentication method. Select User & Password.
N/A
User
The AccessKey ID for your Alibaba Cloud account. You can obtain your AccessKey ID from the AccessKey Management page.
N/A
Password
The AccessKey Secret for your Alibaba Cloud account.
N/A
Database
The name of the Hologres database to connect to. Go to the Instances page in the Hologres console, and obtain the database name on the Database Management page.
postgres
URL
The JDBC connection URL, which is automatically generated from the parameters you configured.
jdbc:postgresql://holodemo-cn-hangzhou.hologres.aliyuncs.com:80/postgres
Test Connection
Click Test Connection to verify your settings. A success message indicates a successful connection.
N/A
-
-
Click OK to save the data source and establish the connection.
After establishing the connection, you can start working with your data. For more information, see the official DataGrip documentation.
Common use cases for Hologres include:
-
Accelerating queries on offline data. For details, see Accelerate queries on MaxCompute data by using foreign tables.
-
Writing data in real time. For details, see Hologres sink table.
-