Unit 2: Defining and Configuring Dimension Tables


Based on the requirements of metrics, this unit defines and configures two dimension tables of Solar_Device_Site_Dimension_Table and Sensor_Site_Dimension_Table to associate solar devices and sensors with sites. The relationships between dimension tables and data tables are as follows.


Dimension Table

Data Table

Solar_Device_Site_Dimension_Table

solar_plant.csv

Sensor_Site_Dimension_Table

weather_sensor.csv

Step 1: Defining the Site Dimension Table of the Solar Device


  1. Log in to EnOS Application Portal and select Metric Management from the application list.

  2. Select Dimensions from the left navigation pane and go to the Dimension Definition page.

  3. In the Dimension Definition tab, select New, go to the New Dimension page, and enter the following information:

    • Basic Information

      • Dimension ID: Enter dim_solarplant

      • Dimension Name: Enter Solar_Device_Site_Dimension_Table

      • Data Connection Type: Select Data Source Registration

      • Select Data Source

        • Data Source Type: Select MySQL

        • Data Source Name: Select tutorial_solar

      • Description: Enter Associate solar devices with sites

    • Logic Information

      • Dimension Attribute 1

        • Attribute ID: Select guid

        • Description: Enter Device ID

        • Data Type: Select STRING

        • Primary Key: Click

      • Dimension Attribute 2

        • Attribute ID: Enter plantid

        • Description: Enter Site ID

        • Data Type: Select STRING

        • Not null: Click


      ../_images/dim_definition.png


  4. Select Publish to save and publish this dimension table.

Step 2: Configuring the Site Dimension Table of the Solar Device


  1. Select the Dimension Configuration tab, select New, select the dimension of dim_solarplant, and select the configuration mode of Sync from Data Catalog.

    • Source Table: Select Data Table

    • Table Name: Select solar_plant

    • Mapping

      • guid: Select guid,

      • plantid: Select plant_id

    • Sync Period: Select Manual

    • Effective From: Select today


      ../_images/dim_configuration.png


  2. Select Next to preview the configuration.

  3. Select Publish to finish the configuration of this dimension table.

Step 3: Defining the Site Dimension Table of the Sensor


  1. Select the Dimension Definition tab, select New, go to the New Dimension page, and enter the following information:

    • Basic Information

      • Dimension ID: Enter dim_sensor

      • Dimension Name: Enter Sensor_Site_Dimension_Table

      • Data Connection Type: Select Data Source Registration

      • Select Data Source

        • Data Source Type: Select MySQL

        • Data Source Name: Select tutorial_solar

      • Description: Enter Associate sensors with sites

    • Logic Information

      • Dimension Attribute 1

        • Attribute ID: Select guid

        • Description: Enter Sensor ID

        • Data Type: Select STRING

        • Primary Key: Click

      • Dimension Attribute 2

        • Attribute ID: Enter plantid

        • Description: Enter Site ID

        • Data Type: Select STRING

        • Not null: Click

  2. Select Publish to save and publish this dimension table.

Step 4: Configuring the Site Dimension Table of the Sensor


  1. Select the Dimension Configuration tab, select New, select the dimension of dim_sensor, and select the configuration mode of Sync from Data Catalog.

    • Source Table: Select Data Table

    • Table Name: Select weather_sensor

    • Mapping

      • guid: Select guid,

      • plantid: Select plant_id

    • Sync Period: Select Manual

    • Effective From: Select today

  2. Select Next to preview the configuration.

  3. Select Publish to finish the configuration of this dimension table.