DataGrip is a database management tool by JetBrains. This guide walks you through installing the MaxCompute JDBC driver in DataGrip, configuring a data source, and running your first queries against a MaxCompute project.
Prerequisites
Before you begin, ensure that you have:
A MaxCompute project. See Create a MaxCompute project
An AccessKey ID and AccessKey secret. Retrieve them from the AccessKey page
The MaxCompute JDBC driver JAR file (
jar-with-dependenciespackage). Download odps-jdbc-3.9.0.jar directly, or get the latest version from GitHub or the Maven repository. This guide uses version 3.9.0DataGrip installed. Download it from JetBrains. See Install DataGrip for instructions. This guide uses DataGrip 2024.3.3
Step 1: Add a driver and configure a data source
Launch DataGrip and access the main interface.
Click Main Menu
, choose File > New > Project.
In the New Project dialog box, enter a project name, for example,
MaxCompute_test.
In the New Project window, click New
> Driver.
On the Data Sources and Drivers page, select the Drivers tab, click
to create a User Driver, and enter a driver name such as MaxCompute.In the Driver Files section, click
> Custom JAR. Select the downloaded JAR file, for example, odps-jdbc-3.9.0-rc4-jar-with-dependencies.jar.Parameter Description Name The driver name, such as MaxCompute.Class After uploading the JAR file, select com.aliyun.odps.jdbc.OdpsDriverfrom the drop-down list.
Go to the Data Sources tab, click
, and select the driver you just added, such as MaxCompute.On the General tab, fill in the connection details.
Parameter Description Name The data source name. Defaults to the driver name. You can customize it. Authentication Select User & Password. User Your AccessKey ID. Retrieve it from the AccessKey page. Password The AccessKey secret that corresponds to your AccessKey ID. URL The JDBC connection URL. See the URL format below. URL format:
jdbc:odps:<MaxCompute_endpoint>?project=<MaxCompute_project_name>[&interactiveMode={true|false}][&useProjectTimeZone={true|false}]Parameters in the URL:
<MaxCompute_endpoint>: Required. The endpoint of MaxCompute for the region where your project resides. See Endpoint for endpoint addresses by region.<MaxCompute_project_name>: Required. The name of your MaxCompute project — not the DataWorks workspace name. To find it, log on to the MaxCompute console, select your region in the navigation bar, and go to Workspace > Projects.interactiveMode: Optional. This parameter specifies whether to enable the MaxCompute Query Acceleration (MCQA) feature. Append&interactiveMode=trueto the URL to enable it. For more information, see Query acceleration.useProjectTimeZone: Optional. Set totrueto use the MaxCompute project's time zone in DataGrip. Append&useProjectTimeZone=trueto the URL.
Click Test Connection to verify the configuration.

Click OK to save the configuration.
Step 2: Manage the MaxCompute project with DataGrip
Once connected, the MaxCompute connection appears in the left-side panel. Write and run SQL scripts to manage your MaxCompute project. For full DataGrip capabilities, see DataGrip Help.
Common operations:
View all tables: Expand the MaxCompute connection in the left-side panel to browse all tables.

Query a table schema: Right-click a table under the MaxCompute connection, choose New > Query Console, and run a query to inspect the schema.

Query table data: Right-click a table under the MaxCompute connection, choose New > Query Console, and run a query to retrieve table data.
