Bosch IoT Insights

Data Explorer: Filtering for specific device attributes

Data can be filtered for specific attributes. This example shows how the status attribute of a Thing can be filtered.

For instance, the device contains the device attribute status to indicate whether a setting was enabled or disabled at the time. Adjust the set parameters in the query template as follows:


Add the following code block to the template definition:

To filter for a specific parameter with a certain value, add $match at the end of the query.

_id: "$_id",
"MetaData": {$first:"$metaData"},
"Payload": {$first:"$payload"},
"DataModifiedAt": {$first:"$metaData.eventStartTs"},
"HistoryModifiedAt": {$first: "$historyData.snapshots.modified"},
"VersionHistory": {$first:"$historyData"},
"VersionHistoryProperties": {$first:"$"},
<#if attribute??> "${attribute}": {$first: "$${attribute}"}</#if>
"$match": {
"": "${status}"
"$limit": 1000