Help Center/ Data Lake Insight/ Best Practices/ Connecting BI Tools to DLI for Data Analysis/ Configuring DBeaver to Connect to DLI for Data Query and Analysis
Updated on 2026-09-08 GMT+08:00

Configuring DBeaver to Connect to DLI for Data Query and Analysis

DBeaver is a free and open-source database management tool that supports multiple databases. With DBeaver as a visual database management tool, you can view database structures, execute SQL queries and scripts, browse data, and export data. This section describes the steps for connecting DBeaver to connect to DLI.

Preparations

  • Toolkit
    • DLI JDBC driver:

      Download the JDBC driver huaweicloud-dli-jdbc-xxx-dependencies.jar from the DLI management console.

    • DBeaver client installation package:

      The DBeaver official website provides client installation packages for different OSs. Download the required DBeaver client installation package and install it on the local PC. DBeaver 24.0.3 is recommended.

  • Connection information:
    Table 1 Connection information

    Item

    Description

    How to Obtain

    DLI's AK/SK

    AK/SK-based authentication uses an AK/SK pair to sign requests for identity authentication.

    Obtaining an AK/SK

    DLI endpoint address

    Endpoint of a cloud service in a region.

    Obtaining an Endpoint

    DLI project ID

    Project ID used for resource isolation.

    Obtaining a Project ID

    DLI region information

    Region to which DLI belongs.

    Regions and Endpoints

Step 1: Create a DLI JDBC Driver in DBeaver

  1. In DBeaver, choose Database > Driver Manager to create a driver connection.

    Use the driver class to load the DLI JDBC driver. Ensure that the JAR file used is huaweicloud-dli-jdbc-2.1.1-jar-with-dependencies.jar.

  2. Click New.
  3. In the dialog box that appears, set driver parameters and click OK.
    Set driver parameters based on Table 2.
    Table 2 Driver parameters

    Parameter

    Description

    Driver Name

    Use an identifiable name, for example, GaussDB Driver.

    Driver Type

    Select Generic as the driver type.

    Class Name

    Java class name used in the JDBC driver to establish database connections.

    URL Template

    DLI JDBC connection format.

    For how to configure DLI's JDBC driver, see Format of DLI's JDBC driver and Example configuration of DLI's JDBC driver.

    jdbc:dli://<endPoint>/projectId?<key1>=<val1>;<key2>=<val2>...

    Default Port

    Database port to connect to.

    Default Database

    Database name to connect to.

    Default User

    Account name, which is root by default.

    • DLI JDBC connection format
      jdbc:dli://<endPoint>/projectId?<key1>=<val1>;<key2>=<val2>...

      ? is followed by other configuration items, with each item listed in the "key=value" format and multiple items are separated by semicolons (;).

    • DLI JDBC driver connection example
      jdbc:dli://dli.ap-southeast-2.myhuaweicloud.com/0b33ea2a7e0010802fe4c009bb05076d?databasename=tpch;queuename=auto;accesskey=XXXX;secretkey=XXXXX;regionname=ap-southeast-2;enginetype=spark;catalog=lfcatalog

      Table 3 and Table 4 describe the parameters.

      Table 3 Driver configuration parameters

      Parameter

      Description

      How to Obtain

      endPoint

      Endpoint of a cloud service in a region.

      Obtaining an AK/SK

      projectId

      Project ID where DLI resources are located.

      Obtaining an Endpoint

      <key1>=<val1>

      ? is followed by other configuration items, with each item listed in the "key=value" format and multiple items are separated by semicolons (;).

      Table 4

      Table 4 key=value parameter description

      Parameter

      Description

      Mandatory

      Example Value

      queuename

      DLI queue name.

      Yes

      dli_test

      databasename

      Database name.

      Yes

      tpch

      accesskey and secretkey

      AK/SK credentials.

      Required when authenticationmode is aksk.

      Yes

      accesskey=your-access-key

      secretkey=your-secret-key

      regionname

      DLI region name.

      Required when authenticationmode is aksk.

      Yes

      -

      charset

      JDBC encoding.

      The default value is UTF-8.

      No

      -

      enginetype

      DLI queue type. Options:

      spark: Spark engine queue.

      The default value is spark.

      No

      spark

      catalog

      Metadata catalog name.

      • Required when using a LakeFormation catalog. Set to the corresponding LakeFormation catalog name.

        When querying a LakeFormation catalog, a default database must exist under the catalog.

      • If not specified, the default DLI catalog is used. No configuration is required when using the DLI catalog.

      No

      For example, if using a LakeFormation catalog named lfcatalog, the configuration is as follows: catalog=lfcatalog.

  4. On the Libraries tab, click Add File and add dli-jdbc-xxx-dependencies.jar in 1.
  5. After the file is added, the driver class is empty. Click Find Class to set the driver class. The identified driver class must match the class name specified on the Settings tab.
  6. Click OK to complete the driver settings.

Step 2: Test the Database Connection

  1. In the menu bar of the DBeaver client, choose Database > New Database Connection and select the data driver created in Step 1: Create a DLI JDBC Driver in DBeaver.
  2. Click Finish to connect to DLI. You can view the connected database information in the Database Navigator pane.
  3. Use the new connection to perform subsequent DLI data query operations.

Step 3: Write SQL Queries in DBeaver

After establishing a DLI connection in DBeaver, you can write SQL queries in DBeaver:

  1. In the database navigation pane on the left, select a database object in Database Navigator. Then, write SQL statements in the SQL editor in the center.
  2. After writing the query, click the run button on the toolbar (usually a green play icon) to execute it.
  3. After execution, results are displayed in the data grid below the SQL editor.