All Products
Search
Document Center

MaxCompute:Connect DBeaver to MaxCompute

Last Updated:Apr 23, 2025

MaxCompute allows you to use the database management tool DBeaver to access MaxCompute projects and manage data. This topic describes how to use a MaxCompute Java Database Connectivity (JDBC) driver to connect DBeaver to a MaxCompute project and use DBeaver to manage data.

Background information

DBeaver is a free, and multi-platform database management tool designed for developers, database administrators, analysts, and other professionals who work with databases.

Prerequisites

Step 1: Connect DBeaver to MaxCompute

  1. Launch DBeaver and access its interface.

  2. Select the type of database you want to connect to.

    In the top menu bar, click 新建. In the Select your database dialog box, choose SQL > SQLite, then click Next to proceed to the Generic JDBC Connection Settings dialog box.

  3. Edit the driver settings.

    1. In the Generic JDBC Connection Settings dialog box, click the Main tab, and then click Driver Settings.

    2. Set the class name and URL template.

      In the Edit Driver 'SQLite' dialog box, click the Settings tab. Enter Com.aliyun.odps.jdbc.odpsdriver in the Class Name field and Jdbc:odps:{file} in the URL Template field. image

    3. Add the JDBC driver JAR package.

      In the Edit Driver 'SQLite' dialog box, click the Libraries tab. Click Add File to associate the MaxCompute JDBC driver JAR package odps-jdbc-3.9.0-rc4-jar-with-dependencies.jar with the libraries of the data source. image

    4. Click OK.

  4. Enter the JDBC URL information.

    In the Generic JDBC Connection Settings dialog box, click the Main tab, then fill out JDBC URL details.

    Parameter

    Description

    Connect by

    Select URL.

    JDBC URL

    The URL that is used to connect to the MaxCompute project.

    • Example: jdbc:odps:https://service.cn-hangzhou.maxcompute.aliyun.com/api?project=test&accessId=xx&accessKey=xx.

    • URL format: jdbc:odps:<maxCompute_endpoint>?project=<maxCompute_project_name>&accessId=<access_id>&accessKey=<access_key>[&interactiveMode={true|false}]. Delete the angle brackets (<>) when you configure this parameter.

      • <maxCompute_endpoint>: required. The endpoint of the region to which the MaxCompute project belongs.

      • <maxCompute_project_name>: required. The name of the MaxCompute project that you want to access.

      • access_id: required. The AccessKey ID that is used to access the MaxCompute project. You can go to the AccessKey Management page to get the AccessKey ID.

      • access_key: required. The AccessKey secret that corresponds to the AccessKey ID.

      • interactiveMode: optional. This parameter specifies whether to enable the MaxCompute Query Acceleration (MCQA) feature.

        If you want to enable the MCQA feature, add &interactiveMode=true to the end of the URL. For more information about the MCQA feature, see Query acceleration.

  5. Click Test Connection. If the Connection Test dialog box indicates Connected, it means the connection between DBeaver and MaxCompute has been established successfully. P6

Step 2: Use DBeaver to query and analyze data

After connecting DBeaver to MaxCompute, you can view the established MaxCompute connection in the left-side navigation tree of DBeaver and manage the MaxCompute project using the SQL feature. You can perform the following operations based on your business requirements. For more information about these operations, see the DBeaver help information.

  • Query all existing tables

    You can query the information of all existing tables listed under the established MaxCompute connection.

    P7

  • Query table schema

    Right-click the table you want to query under the established MaxCompute connection and select View Table to view its schema.

    P8

  • Query table data

    • You can click SQL Editor > New SQL Editor under the established MaxCompute connection, enter your desired table's SQL query into the editor, and then execute the query.

      p9

    • If your project's schema syntax switch is not enabled, see Enable the schema feature for details. Alternatively, right-click the desired table under the established MaxCompute connection, select View Project, and navigate to the Data tab to view the data.

      p10