This topic provides an overview of metrics, including their definitions, domains, and types.
Metric
A metric is a standard of measurement used to quantify the progress or state of various entities, commonly known as a measure. Examples include temperature, population, GDP, income, user count, profit margin, retention rate, and coverage rate.
Metric domain
A metric domain refers to the category to which a metric is assigned, facilitating the organized management of metrics. The IoT Platform DataService Studio categorizes metrics into two domains: product and device.
Metric type
Original Definition
Original definition metrics originate from the Thing Specification Language definitions associated with a product on the IoT Platform.
To view the defined Thing Specification Language, navigate to the Product Details page via the Device Management > Product page in the IoT console and select Feature Definition.
Original Metric
Original metrics are derived from device-reported properties on the IoT Platform or from parsing custom topics.
Navigate to the Device Details page via the Device Management > Device section in the IoT console, and select Thing Specification Language Data to examine the device properties.
Derived Definition
Derived definitions are extensions of original definition metrics, applied to sub-entities based on the original metric.
These metrics act as property definitions without specific data values and are not calculated at the product level but rather at the device level, aggregating the derived metric data.
Derived definition metrics are calculated solely for devices within the product, aggregating the metric data from the derived metrics of each device.
The derived definition metrics for the product and the derived metrics for each associated device share a common metric code.
Derived Metric
Derived metrics result from aggregation calculations, such as summation or averaging, based on original metrics, original definitions, and derived definitions.
The temporal scope of derived metrics is defined as a time modifier, while other conditions are encapsulated as business modifiers.
Thus, derived metrics comprise three components: time modification (mandatory), business modification (optional), and an atomic term (mandatory).
For more details on adding metrics, see Create a Metric.
Scope of metric type usage
The table below clarifies which metric types are supported within their respective domains.
Metric Type | Product | Device |
Original Definition | Supported | Not applicable |
Original Metric | Not applicable | Supported |
Derived Definition | Supported | Not applicable |
Derived Metric | Supported | Supported |
A single product entity may include both derived definition and derived metric types.
For instance, consider the derived definition Average Temperature of the Last Day for product PK1. If PK1 comprises 100 devices DNn (where n=1..100), creating an individual derived metric for Average Temperature of the Last Day for each device would necessitate 100 configurations. Instead, a single derived definition can be established for product PK1, automatically applying the derived metric Average Temperature of the Last Day to all 100 devices.