DataGrip is a database IDE that supports connections to multiple databases from a single client. This topic describes how to connect DataGrip to a Hologres instance using the PostgreSQL driver.
Prerequisites
Before you begin, make sure you have:
DataGrip installed. Download it from jetbrains.com/datagrip. This topic uses DataGrip 2024.2.1 as an example.
A Hologres instance with a database created. See Purchase a Hologres instance and Create a database.
The public endpoint enabled for the instance. See Instance details.
Connect DataGrip to Hologres
Open DataGrip. On the Database Explorer toolbar, click the
icon to add a new data source.Select Data Source > PostgreSQL.

In the Data Sources and Drivers dialog, configure the following parameters. The URL field combines the Host, Port, and Database values:
If the
missing driver filesmessage appears, click Download to install the required driver files.Parameter Description Example Name A display name for this connection — Host The public endpoint of the Hologres instance. In the Hologres console, go to Instance Details > Network Information. holodemo-cn-hangzhou.hologres.aliyuncs.comPort The public port of the Hologres instance. Find it in Instance Details > Network Information. 80Authentication Select User & Password. — User Your Alibaba Cloud AccessKey ID. Get it from the AccessKey Management page. — Password Your Alibaba Cloud AccessKey secret. — Database The name of the Hologres database to connect to. Find database names on the Database Management page in the Hologres console. postgresURL The connection URL generated automatically from the values above. jdbc:postgresql://holodemo-cn-hangzhou.hologres.aliyuncs.com:80/postgresjdbc:postgresql://holodemo-cn-hangzhou.hologres.aliyuncs.com:80/postgres ^ ^ ^ |- Host Port-| |- Database
Click Test Connection. A success message confirms the connection is working.
For older versions of DataGrip, if the connection fails after driver installation, go to the Options tab, find the Introspection section, and select Introspect using JDBC metadata. Then retry the connection test.

Click OK to save the connection.
What's next
After connecting DataGrip to Hologres, you can query and develop data. For DataGrip usage, see the DataGrip documentation.
Common Hologres scenarios:
Accelerating offline queries: Query MaxCompute data directly through Hologres foreign tables. See Accelerate queries of MaxCompute data using foreign tables.
Real-time data ingestion: Write streaming data into Hologres sink tables. See Hologres sink tables.