Updated on 2024-06-17 GMT+08:00

Obtaining Data from MySQL Databases for Analysis

Connecting to Database

You can only analyze data after connecting to a database first.

  1. On the management page, choose Data > Databases and click +DATABASE.
  2. Select the database to be connected, for example, the MySQL database.
  3. Enter the information about the database to be connected.
    Table 1 Parameter descriptions

    Parameter

    Description

    HOST/PORT

    Specifies the public IP address and port number of the database. The default MySQL port number is 3306.

    DATABASE NAME

    Specifies the name of the database to be connected.

    USERNAME/PASSWORD

    Specifies the username and password of the database.

    DISPLAY NAME

    Specifies the name displayed on Superset after the database is connected.

  4. Click CONNECT.
  5. Click FINISH and you can view the connected database in the list.

Adding Datasets

Now that you have configured a data source, you need to register tables (called Datasets in Superset) for subsequent chart creation.

  1. Choose Data > Datasets and click +DATASET.

  2. Click ADD, and you can view your dataset in the list of datasets.

Creating Charts

Superset is a powerful visualization builder that allows you to create charts and dashboards. This section is for demonstration only. You can create exquisite charts and dashboards by referring to the official guide.

  1. Click the database name to visualize the chart.

  2. Click SAVE to add the chart to the dashboard.

  3. Click SAVE & GO TO DASHBOARD. The visualized chart is displayed on the dashboard.