DataGrip is a development tool that allows you to connect an application to multiple databases. DataGrip facilitates the creation, management, and maintenance of databases. This topic describes how to use the DataGrip client to connect to a Hologres database.
Prerequisites
The DataGrip client is installed. If it is not installed, download it from the DataGrip page and install it. In this example, DataGrip 2024.2.1 is used.
A Hologres instance is purchased and a database is created. For more information, see Purchase a Hologres instance and Create a database.
The access over the Internet is enabled for the Hologres instance. For more information, see Instance configurations.
Procedure
To connect to a Hologres database from the DataGrip client, perform the following steps:
Open the DataGrip client and click the icon below Database Explorer.
Choose Data Source > PostgreSQL.
In the Data Sources and Drivers dialog box, configure the parameters described in the following table.
NoteIf the
missing driver files
message appears, click Download to download the driver first.If you use an earlier version of the DataGrip client, select Introspect using JDBC metadata in the Introspection section of the Options tab.
Parameter
Description
Example
Name
The custom name of the connection.
N/A
Host
The public endpoint of the Hologres instance. You can view the public endpoint of the Hologres instance in the Network Information section of the Instance Details page in the Hologres console.
holodemo-cn-hangzhou.hologres.aliyuncs.com
Port
The public port number of the Hologres instance. You can view the port number of the Hologres instance in the Network Information section of the Instance Details page in the Hologres console.
80
Authentication
The authentication method. Select User & Password.
N/A
User
The AccessKey ID of your account that is used to access the Hologres instance. You can obtain the AccessKey ID from the AccessKey Pair page.
N/A
Password
The AccessKey secret of your account that is used to access the Hologres instance.
N/A
Database
The name of the Hologres database to which you want to connect. To view the name of the database, go to the Instance Details page in the Hologres console and click Database Management in the left-side pane.
postgres
URL
The connection address that is automatically generated based on the preceding configurations.
jdbc:postgresql://holodemo-cn-hangzhou.hologres.aliyuncs.com:80/postgres
Test Connection
Click Test Connection. If the Connection Success message appears, DataGrip connects to the Hologres database.
N/A
Click OK.
After DataGrip connects to the Hologres database, you can perform data development operations by using DataGrip. For more information, see DataGrip documentation.
Hologres is typically used in the following scenarios:
Accelerated query of offline data. For more information, see Create a foreign table in Hologres to accelerate queries on MaxCompute data.
Real-time data write. For more information, see Hologres result table.