Skip to content

Commit c75187a

Browse files
authored
Merge pull request #187677 from ralarcon/iot-routing-sample
Iot routing sample
2 parents b44de18 + c937466 commit c75187a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

articles/iot-hub/iot-hub-devguide-routing-query-syntax.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,15 @@ $body.Weather.Temperature = 50 AND processingPath = 'hot'
163163
```
164164

165165
> [!NOTE]
166-
> To filter a twin notification payload based on what changed, run your query on the message body:
166+
> To filter a twin notification payload based on what changed, run your query on the message body. For example, to filter when there is a desire property change on `sendFrequency` and the value is bigger than 10:
167167
>
168168
> ```sql
169-
> $body.properties.desired.telemetryConfig.sendFrequency
169+
> $body.properties.desired.telemetryConfig.sendFrequency > 10
170+
> ```
171+
> To filter messages that contains a property change, no matter the value of the property, you can use the `is_defined()` function (when the value is a primitive type):
172+
>
173+
> ```sql
174+
> is_defined($body.properties.desired.telemetryConfig.sendFrequency)
170175
> ```
171176
172177
> [!NOTE]

0 commit comments

Comments
 (0)