IoT Hub query explorer
IoT Hub supports a SQL-like language to retrieve information regarding device twins, jobs, and message routing. Basically, you can write a basic SQL command and that will be executed against the device registry.
Each query follows the syntax like SQL; it has the standard SELECT
, FROM
, and WHERE
keywords used to retrieve the result set in the result window.
How to do it...
In this section, we will follow the steps to use the query explorer and retrieve the device information in the results window:
- we will select the IoT Hub
IoTHubCookBook
service from the Azure portal. - Select
Query Explorer
:

- Using the execution windows, type the query you want to execute:

- The output will be shown in the result window:

There's more...
IoT Hub query explorer is easy to use on the collection of the device registry. Some of the sample queries will be as follows:
SELECT * FROM devices
We tried a simple query which selects all devices. Now, let's try to query using the device tags and device twin. we...