跳转至

Create Data Set#

🔒 Dataset.Create

🔒 Dataset.CreateTemplate

🔒 Dataset.CreateFromTemplate

Overview#

The Data Set is a Data Platform entity that can be easily created by authorized users. In addition to the normal creation process, you can create Data Sets by using templates in .xml format and importing them using the Import button.

Data Sets are automatically created as part of the process of creating IoT Event Definitions, or they can be manually created by defining SQL queries. Data Sets created this way, without a direct link to IoT Event Definitions, are of type Query, meaning they behave as user-defined views on top of database tables.

Setup#

No specific setup is required other than to meet the preconditions of the transaction.

Preconditions#

  • The Data Set name must be unique in the folder in which it will be created.

Warning

The following characters are not supported: ., /, \, and $.

Sequence of Steps#

Step 1: General Data#

  1. Enter the Name of the Data Set (must be unique in the target folder).
  2. Enter the Description.
  3. Select a Data Group if you want to restrict the access to the data in the Data Set (assuming Objects Security Level is active in MES).
  4. Select the Folder where the Data Set should be placed.
  5. Select the Data Source which contains the tables with the data you want to access:
    • CDM - contains the tables with the data from IoT Events, which includes system CDM events and user-created IoT Events
    • DWH - contains the data warehouse tables with the data that is being automatically aggregated
    • ODS - contains the tables with the MES ODS data
  6. Choose the Owner Type, depending on which you will need to set additional configurations:

    • App - when available, select the App that will be using this Data Set
    • Role - select the Owner Role for this Data Set
    • User - select the Owner User for this Data Set
  7. Select Next to continue.

    Create Data Set

Step 2: Fields#

In this step there are two tabs, Query and Fields.

  1. Write your SQL SELECT statement in the Query tab.
  2. Select the Validate button to validate your query and retrieve the fields.

    Query

    The Validate button will populate the grid of fields in the Fields tab, located on the top right. This enables you to edit the following properties for each field:

    • Description
    • Field Type
      • Dimension
      • Metric
      • Timestamp
      • None
    • Low Cardinality

    Info

    Fields of type Timestamp are automatically picked for the x-axis in time-series visualization in Grafana, so if a field has that type and you do not want to use it for that purpose you should set the type to None.

  3. When you are have edited the fields, select Create to complete the creation of the data set.

    Fields

The Data Set should now be available in the folder you picked, and its data readily available to be accessed via OData client such as Grafana, Power BI or Excel.