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

Configuring Superset to Connect to DLI for Data Query and Analysis

Superset is an open-source data exploration and visualization platform. It supports fast and intuitive data exploration, and enables rich visualizations and interactive dashboards.

By interconnecting Superset with DLI, you can access DLI for data query and analysis. This simplifies data access workflows and provides unified data management and analytics capabilities, enabling deeper data insights.

This section describes the steps for connecting Superset to DLI.

Preparations

  • Obtaining the DLI JDBC driver

    Download the dli-sdk-python driver from the DLI management console.

  • Preparing 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: Install Superset and Configure the Data Connection Driver

  1. Download and install Superset.

    For details, see Installing Superset.

    The following uses Docker-based Superset installation as an example:

    1. Install Docker on the current host.
    2. Pull the Superset Docker image.
      docker pull apache/superset
    3. Start the Superset container.
      docker run -p 8088:8088 apache/superset

      This starts the Superset container and maps container port 8088 to host port 8088.

    4. Access Superset.

      In a browser, open http://IP address:8088 (where IP address is the IP address of the host where Superset is deployed) and log in to Superset using the username and password configured during Superset installation.

  2. Install and configure the DLI driver in Superset to connect to the database.

    The driver must be placed in the Superset classpath, for example, the superset-classpath directory.

    Extract the installation package and install the DLI driver in the Superset client.

    Run Python setup.py install to install the dli-sdk-python in the local environment.

    Figure 1 Installing the JDBC driver in the Superset client

  3. After driver installation and configuration are complete, restart the Superset service to ensure the driver takes effect.

Step 3: Configure Superset to Connect to DLI

In Superset, add a database connection as follows:

  1. Open Superset and log in.
  2. Choose Settings > Database Connections and click + DATABASE.
    Figure 2 Choosing Settings
    Figure 3 Clicking + DATABASE
  3. In the dialog box that appears, set SUPPORTED DATABASES to DLI.
    Figure 4 Selecting DLI
  4. Configure data connection details.
    • DISPLAY NAME: Custom data connection name.
    • SQL ALCHEMY URI: Data connection URL.

      Data connection URL format:

      dli://<accesskey_id>:<accesskey_secret>@<region_id>/?projectid=<project_id>&queuename=<dli_queue_name>&databasename=<dli_default_database_name>&enginetype=<engine_type>&catalog=< lakeformation_catalog_name>

      Table 2 Superset-to-DLI parameter description

      Parameter

      Mandatory

      Description

      Example Value

      accesskey_id and accesskey_secret

      Yes

      AK/SK credentials.

      -

      region_id

      Yes

      Region name.

      ap-southeast-2

      projectid

      Yes

      Project ID where DLI resources are located.

      0b33ea2a7e0010802fe4c009bb05076d

      queuename

      Yes

      DLI queue name.

      dli_test

      databasename

      Yes

      Default database to access.

      dli

      enginetype

      No

      DLI queue type. Options:

      spark: Spark engine queue.

      The default value is spark.

      spark

      catalog

      No

      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.

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

      Figure 5 Configuring URL information
  5. After entering the connection information, click TEST CONNECTION to verify connectivity. If the message Connection looks good! appears, the connection is successful.
  6. If the test succeeds, click CONNECT to establish a data connection with DLI.
  7. Click OK to save the connection.

Step 3: Query and Analyze Data Using Superset

  1. View table information.

    In the top menu of Superset, choose Datasets. On the right side, click + DATASET and set DATABASE, SCHEMA, and TABLE to preview table information.

    Figure 6 Previewing table information in Superset

  2. Create a dataset.

    Click CREATE DATASET AND CREATE CHART in the lower right corner.

    Figure 7 CREATE DATASET AND CREATE CHART

  3. Visualize and analyze data.

    On the dataset page, select the target table and configure the chart type and dimensions to display business analytics charts.

    Figure 8 Visual data analysis using Superset