A dataset is a collection of data in the form of a two-dimensional table. The data is generated after an SQL statement is executed to query a database. This topic describes how to manage datasets.

Create a dataset

  1. Log on to the DMS console V5.0.
    Note To switch to the previous version of the DMS console, click the 5租户头像 icon in the lower-right corner of the page. For more information, see Switch to the previous version of the DMS console.
  2. In the top navigation bar, click DTS. In the left-side navigation pane, choose Data Application > Data Visualization.
    Note
    • If you are using the previous version of the DMS console, move the pointer over the More icon in the top navigation bar and choose Data Factory > Data Visualization.
    • For more information about how to go to the Data Visualization page, see Access the data visualization feature.
  3. On the Dataset management page, click the icon in the upper-right corner.
  4. In the Writing SQL step, set the parameters as required and click Execute.
    Parameter Description
    Name Required. The name of the dataset. The dataset name must be unique for each Data Management (DMS) user.
    Description Optional. The description of the dataset.
    Database Required. The database to be queried. You must have permissions to query the database.
    SQL statement Required. The SELECT statement for querying data. You can write an SQL statement that can be executed in the field. To filter data in a subsequent chart, reference a variable in the $Variable name$ format in the SQL statement.
    Variable Optional. The variable to be referenced for filtering data. On a dashboard where you have configured a filter, you can filter data by dynamically changing the value of the variable that is referenced by the SQL statement in the dataset. Note: When a variable of the STRING data type is referenced, you still need to enclose the variable in single quotation marks (' ') in the SQL statement. Example: name ='$var1$'.
  5. After the SQL statement is executed, click Next Step.
  6. In the Edit dataset model step, set the Data type and Visualization type parameters for each field as required.

    In this step, you must specify each queried field as a dimension or measure, and specify a visualization type for each field.

    Parameter Valid value Sample scenario
    Data type
    • Dimension: the statistical value that is obtained after an aggregation operation.
    • Measure: the scope, aspect, or angle of a measure.
    For more information, see Terms.
    To show how the transaction volume changes over time, you can set the Data type parameter of the time field to Dimension and that of the transaction volume field to Measure.
    Visualization type
    • Digital
    • String
    • Date
    • Geography: Country
    • Geography: Provinces
    • Geography: City
    To show how the transaction volume changes over time, you can set the Visualization type parameter of the time field to Date and that of the transaction volume field to Digital.
  7. Click Save.
    The dataset is created, and you are navigated to the Dataset management page.
    Note You can also click Configure a new chart. By default, you are navigated to the page where you can create a chart based on the dataset that you created. For more information about how to create a chart, see Manage charts.

Modify a dataset

  1. Log on to the DMS console V5.0.
    Note To switch to the previous version of the DMS console, click the 5租户头像 icon in the lower-right corner of the page. For more information, see Switch to the previous version of the DMS console.
  2. In the top navigation bar, click DTS. In the left-side navigation pane, choose Data Application > Data Visualization.
    Note If you are using the previous version of the DMS console, move the pointer over the More icon in the top navigation bar and choose Data Factory > Data Visualization.
  3. On the Dataset management page, find the dataset that you want to modify and click the icon in the Operation column.
    You are navigated to the page where you can modify the dataset. For more information about how to write SQL statements and modify dataset models, see Create a dataset.

Delete a dataset

  1. Log on to the DMS console V5.0.
    Note To switch to the previous version of the DMS console, click the 5租户头像 icon in the lower-right corner of the page. For more information, see Switch to the previous version of the DMS console.
  2. In the top navigation bar, click DTS. In the left-side navigation pane, choose Data Application > Data Visualization.
    Note If you are using the previous version of the DMS console, move the pointer over the More icon in the top navigation bar and choose Data Factory > Data Visualization.
  3. On the Dataset management page, find the dataset that you want to delete and click the icon in the Operation column.
    Note Before a dataset is deleted, DMS checks whether the dataset is referenced by a chart. If the dataset is referenced, you cannot delete the dataset. To delete the dataset, you must go to the chart editing page to cancel the reference or delete the chart that references the dataset.