Managing a Dimension Definition


You can create a new dimension definition on the dimension definition tab of the dimension table page, and edit and publish the dimension definition.

Prerequisites


Before you start, ensure the following:

  • The current account has been assigned a menu group including Dimensions. If not assigned, contact the application administrator.
  • When you select Data Source Registration as your data connection type, you need to ensure that the configuration of the data source has been completed in Data Source Registration.

Creating a Dimension Definition


  1. Select Dimensions in the left navigation bar, which goes to the Dimension Definition tab by default.

  2. In Dimension Definition tab, select New to go to the New Dimension page.

  3. Enter the following Basic Information:

    • Dimension ID: Enter the unique ID of the dimension under the current OU.
    • Dimension Name: Enter a name for the dimension.
    • Data Connection Type: Select Data Source Registration or None.
      • Select Data Source Registration, select the data source type and data source name, then define the location where the dimension table is stored and the data source in the dimension table.
      • Select None, after which you can configure data for the attributes in the dimension table by calling the Open API.
    • Select Data Source: Select the data source type and the name of the data source registered under this type.
    • Description: Enter a description for the dimension table.
  4. Enter the following Logic Information:

    • Dimension Attribute: Configure attributes for the dimension. For example, the country name, country ID, or province name in the geographic dimension are dimension attributes. Among them, guid is an attribute that is automatically displayed every time a dimension table is created. Attributes can be added by selecting the duplicate button duplicate_icon or by selecting Add.


    Field Description
    Attribute ID The custom attribute ID must be unique in the current dimension table. This attribute can be understood as the header of the dimension table and must start with a lowercase letter.
    Description Enter a description of the attribute to help identify it and make its use clear.
    Data Type The type of the attribute value.
    Primary Key The primary key has no business meaning. The primary key value also cannot be blank and cannot be repeated. The data type of the attribute set as the primary key is usually STRING. The primary key can be understood as the first column of the dimension table, and can be associated with the foreign key of a fact table. For example, in the device dimension table, the device ID is used as the primary key, and all attribute data of a certain device can be located using the device ID. In the corresponding fact table, there is also a device ID, which can associate the dimension table with the fact table.
    Not null If the attribute is set as not null, the attribute value may not be blank when configuring data mapping, otherwise it will affect metric querying.


    • Dimension Hierarchy: Multiple attributes in a dimension table are sometimes related to each other in a hierarchy. If there is a hierarchical relationship between dimensions, you can select Add, fill in the dimension hierarchy in the pop-up window and add it, and then you can aggregate and drill down metric data by the dimension hierarchy.
      • Hierarchy Id: Enter a hierarchy ID. Must be unique in the current dimension table.
      • Hierarchy Name: Enter a hierarchy name.
      • Hierarchy Type: Select a hierarchy type. The hierarchy types are explained in the table below.


    Hierarchy Type Meaning Example Related Operations
    Standard Hierarchy Data can be divided into multiple hierarchies, showing a tree structure. This type of hierarchy is generally used for data with a relatively fixed number of hierarchies. The hierarchy of a wind turbine group is divided into continents, countries, and regions according to geographical regions(see Figure 1). Select added dimension attributes as the ID and Name of the hierarchy.
    The order of the hierarchies can be adjusted by dragging.
    Parent-Child Hierarchy The data is divided into 2 hierarchies, and there is a parent-child relationship between the two hierarchies. This type of hierarchy is generally used for data with an unfixed number of hierarchies. For example, the geographic dimension can generally be divided into country - province - city - county/administrative district, but for Shanghai, as a municipality directly under the Central Government, there is no province hierarchy. By using this parent-child hierarchies to divide data can avoid situations where some data cannot be aligned to a fixed hierarchy after using a standard hierarchy. For the geographic dimension, you can set the following dimension attributes: ID, name, parent node ID. Parent node ID can be used to locate the parent hierarchy. The generated dimension table is shown in Figure 2. Enter the IDs and names of the Parent Level Fields and Child Level Fields.


    Figure 1:

    ../_images/standard_hierarchy.png


    Figure 2:

    ../_images/parent_hierarchy.png

    Note

    The same attribute ID can be reused in different dimension hierarchies under the current dimension.


    • Extra Attributes: You can add additional information for the dimension table which has nothing to do with dimension attributes and will not be stored in the dimension table. For example, the creator of the dimension table, the creation time of the dimension table, and the domain to which the dimension table belongs.
  5. Select Publish to save and publish the dimension definition.

    If you don’t want to publish the dimension definition for the moment, you can Save it as a draft. To publish it later, see Publishing a Dimension Definition.


After saving or publishing the dimension definition for the current dimension table, you can view it in the list on the dimension definition tab.

Editing a Dimension Definition


  1. Select Dimensions in the left navigation bar, which goes to the Dimension Definition tab by default.
  2. Select Edit edit_icon at the end of the row in the target dimension table, and then save or publish the changes.

Deleting a Dimension Definition


To delete a dimension definition, make sure you have deleted the dimension configuration associated with the dimension definition in advance. To delete a dimension configuration, see Deleting a Dimension Configuration.


  1. Select Dimensions in the left navigation bar, which goes to the Dimension Definition tab by default.
  2. Select Delete delete_icon after hovering over the ellipsis (…) at the end of the target dimension table row.

Publishing a Dimension Definition


  1. Select Dimensions in the left navigation bar, which goes to the Dimension Definition tab by default.
  2. Dimension definitions can be published in the following two ways:
    • Select Publish publish_icon at the end of the target dimension table row.
    • Check multiple dimension tables to publish and select Publish publish_2_icon at the top of the page to publish dimension definitions in batches.

After the dimension definition is published, the dimension can be configured on the Dimension Configuration tab.

Unpublishing a Dimension Definition


To unpublish a dimension definition, ensure that the dimension configuration associated with the dimension definition has been deleted in advance. To delete a dimension configuration, see Deleting a Dimension Configuration.


  1. Select Dimensions in the left navigation bar, which goes to the Dimension Definition tab by default.
  2. Select Unpublish unpublish_icon at the end of the target dimension table row to unpublish the dimension definition.

Viewing an Online Version of a Dimension Definition


  1. Select Dimensions in the left navigation bar, which goes to the Dimension Definition tab by default.
  2. Hover the mouse over the ellipsis (…) at the end of the target dimension definition row for which the status is Updated for Publish, and then select View Online Version view_version_icon to view the dimension definition in its most recently modified version.

Reverting a Dimension Definition to an Online Version


  1. Select Dimensions in the left navigation bar, which goes to the Dimension Definition tab by default.
  2. Hover the mouse over the ellipsis (…) at the end of the target dimension definition row for which the status is Updated for Publish, and then select Revert to Online Version revert_version_icon to republish the previous dimension definition.