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¶
Log in to EnOS Application Portal and select Metric Management from the application list.
Select Dimensions from the left navigation pane and go to the Dimension Definition page.
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
- Data Source Type: Select
- Description: Enter
Associate solar devices with sites
- Dimension ID: Enter
Logic Information
- Dimension Attribute 1
- Attribute ID: Select
guid
- Description: Enter
Device ID
- Data Type: Select
STRING
- Primary Key: Click
- Attribute ID: Select
- Dimension Attribute 2
- Attribute ID: Enter
plantid
- Description: Enter
Site ID
- Data Type: Select
STRING
- Not null: Click
- Attribute ID: Enter
- Dimension Attribute 1
Select Publish to save and publish this dimension table.
Step 2: Configuring the Site Dimension Table of the Solar Device¶
Select the Dimension Configuration tab, select New, select the dimension of
dim_solarplant
, and select the configuration mode ofSync from Data Catalog
.Source Table: Select
Data Table
Table Name: Select
solar_plant
Mapping
- guid: Select
guid
, - plantid: Select
plant_id
- guid: Select
Sync Period: Select
Manual
Effective From: Select today
Select Next to preview the configuration.
Select Publish to finish the configuration of this dimension table.
Step 3: Defining the Site Dimension Table of the Sensor¶
- 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
- Data Source Type: Select
- Description: Enter
Associate sensors with sites
- Dimension ID: Enter
- Logic Information
- Dimension Attribute 1
- Attribute ID: Select
guid
- Description: Enter
Sensor ID
- Data Type: Select
STRING
- Primary Key: Click
- Attribute ID: Select
- Dimension Attribute 2
- Attribute ID: Enter
plantid
- Description: Enter
Site ID
- Data Type: Select
STRING
- Not null: Click
- Attribute ID: Enter
- Dimension Attribute 1
- Basic Information
- Select Publish to save and publish this dimension table.
Step 4: Configuring the Site Dimension Table of the Sensor¶
- Select the Dimension Configuration tab, select New, select the dimension of
dim_sensor
, and select the configuration mode ofSync from Data Catalog
.- Source Table: Select
Data Table
- Table Name: Select
weather_sensor
- Mapping
- guid: Select
guid
, - plantid: Select
plant_id
- guid: Select
- Sync Period: Select
Manual
- Effective From: Select today
- Source Table: Select
- Select Next to preview the configuration.
- Select Publish to finish the configuration of this dimension table.