Skip to content

Commit 4d9b457

Browse files
authored
Merge pull request #205007 from dominicbetts/central-mapping-unmodeled
IoT Central: unmodeled mapping example
2 parents d01de22 + a053b93 commit 4d9b457

File tree

1 file changed

+67
-2
lines changed

1 file changed

+67
-2
lines changed

articles/iot-central/core/howto-map-data.md

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ To verify that IoT Central is mapping the telemetry, navigate to **Raw data** vi
7272

7373
If you don't see your mapped data after refreshing the **Raw data** several times, check that the JSONPath expression you're using matches the structure of the telemetry message.
7474

75-
For IoT Edge devices, the data mapping applies to the telemetry from all the IoT Edge modules and hub. You can't apply mappings to a specific IoT edge module.
75+
For IoT Edge devices, the data mapping applies to the telemetry from all the IoT Edge modules and hub. You can't apply mappings to a specific Azure IoT Edge module.
7676

77-
For devices assigned to a device template, you can't map data for components or inherited interfaces. However, you can map any data from your device before you assign it to a device template.
77+
For devices assigned to a device template, you can't map data for components or inherited interfaces. However, you can [map any data from your device before you assign it to a device template](#map-unmodeled-telemetry).
7878

7979
## Manage mappings
8080

@@ -84,6 +84,71 @@ To view, edit, or delete mappings, navigate to the **Mapped aliases** page. Sele
8484

8585
By default, data exports from IoT Central include mapped data. To exclude mapped data, use a [data transformation](howto-transform-data-internally.md) in your data export.
8686

87+
## Map unmodeled telemetry
88+
89+
You can map unmodeled telemetry, including telemetry from unmodeled components. For example, given the `workingSet` telemetry defined in the root component and the `temperature` telemetry defined in a thermostat component shown in the following example:
90+
91+
```json
92+
{
93+
"_unmodeleddata": {
94+
"workingSet": 74
95+
},
96+
"_eventtype": "Telemetry",
97+
"_timestamp": "2022-07-18T09:22:40.257Z"
98+
}
99+
100+
{
101+
"_unmodeleddata": {
102+
"thermostat2": {
103+
"__t": "c",
104+
"temperature": 44
105+
}
106+
},
107+
"_eventtype": "Telemetry",
108+
"_timestamp": "2022-07-18T09:21:48.69Z"
109+
}
110+
```
111+
112+
You can map this telemetry using the following mapping definitions:
113+
114+
* `$["workingSet"] ws`
115+
* `$["temperature"] temp`
116+
117+
> [!NOTE]
118+
> Don't include the component name in the mapping definition.
119+
120+
The results of these mapping rules look like the following examples:
121+
122+
```json
123+
{
124+
"telemetries": {
125+
"workingSet": 84,
126+
"_mappeddata": {
127+
"ws": 84
128+
}
129+
}
130+
}
131+
132+
{
133+
"_unmodeleddata": {
134+
"thermostat2": {
135+
"__t": "c",
136+
"temperature": 12
137+
},
138+
"_mappeddata": {
139+
"thermostat2": {
140+
"__t": "c",
141+
"temp": 12
142+
}
143+
}
144+
},
145+
"_eventtype": "Telemetry",
146+
"_timestamp": "2022-07-18T09:31:21.088Z"
147+
}
148+
```
149+
150+
Now you can use the mapped aliases to display telemetry on a chart or dashboard. You can also use the mapped aliases when you export telemetry.
151+
87152
## Next steps
88153

89154
Now that you've learned how to map data for your device, a suggested next step is to learn [How to use data explorer to analyze device data](howto-create-analytics.md).

0 commit comments

Comments
 (0)