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.
  2. In the top navigation bar, move the pointer over the More icon and choose Data Factory > Data Visualization.
    Note For more information about how to go to the Data Visualization tab, see Access the data visualization feature.
  3. On the Dataset management tab, click the icon.
  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. For example, a variable named S_ID is used in the following SQL statement: SELECT * FROM 'student_courses' WHERE 'student_id' = $S_ID$;.

    Note When a variable of the STRING data type is referenced, you need to enclose the variable in single quotation marks (') in the SQL statement. Example: name ='$var1$'.
    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. For more information, see Manage dashboards.
    Note We recommend that you specify a default value for each variable.
  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 Description
    Data type Valid values:
    • Dimension: the scope, aspect, or angle of measures.
    • Measure: the statistical value that is obtained after an aggregation operation.
    To show how transaction volume changes over time, you can set the Data type parameter for the time field to Dimension and that for the transaction volume field to Measure. For more information, see Terms.
    Visualization type Valid values:
    • Digital
    • String
    • Date
    • Geography: Country
    • Geography: Provinces
    • Geography: City
    To show how transaction volume changes over time, you can set the Visualization type parameter for the time field to Date and that for the transaction volume field to Digital.
  7. Click Save.
    The dataset is created and you are navigated to the Dataset management tab.
    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 newly created dataset. For more information about how to create a chart, see Manage charts.

Modify a dataset

  1. Log on to the DMS console.
  2. In the top navigation bar, move the pointer over the More icon and choose Data Factory > Data Visualization.
  3. On the Dataset management tab, 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 edit dataset models, see Create a dataset.

Delete a dataset

  1. Log on to the DMS console.
  2. In the top navigation bar, move the pointer over the More icon and choose Data Factory > Data Visualization.
  3. On the Dataset management tab, 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.