Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This article shows you how to ingest data into Azure Data Explorer from IoT Hub, a big data streaming platform and IoT ingestion service.
To learn how to create the connection in the Azure portal or with an ARM template, see Create an IoT data connection.
For general information about ingesting into Azure Data Explorer from IoT Hub, see Connect to IoT Hub.
Note
Only events enqueued after you create the data connection are ingested.
For code samples based on previous SDK versions, see the archived article.
In this section, you'll establish a connection between the IoT Hub and your Azure Data Explorer table. As long as this connection is in place, data is transmitted from the IoT Hub into your target table.
In the left menu of your Azure Data Explorer cluster, select Databases then select the database that contains your target table.
Select Data connections and Add data connection. From the dropdown, select IoT Hub.
Fill out the form with the following information.
Setting | Field description |
---|---|
Data connection name | The name of the connection you want to create in Azure Data Explorer |
Subscription | The subscription ID where the Event Hubs resource is located. |
IoT Hub | IoT Hub name |
Shared access policy | The name of the shared access policy. Must have read permissions |
Consumer group | The consumer group defined in the IoT Hub built-in endpoint |
Event system properties | The IoT Hub event system properties. When adding system properties, create or update table schema and mapping to include the selected properties. |
Note
Depending on your use case, you may want to turn on multi-database routing. For more information about database routing, see Events routing.
Fill out the following routing settings:
Setting | Suggested value | Field description |
---|---|---|
Table name | TestTable | The table you created in testdb. |
Data format | JSON | Supported formats are AVRO, CSV, JSON, ORC, PARQUET, PSV, SCSV, SOHSV, TSV, TXT, TSVE, APACHE AVRO, and W3CLOG. |
Mapping | TestMapping | The mapping you created in testdb, which maps incoming data to the column names and data types of testdb. If not specified, an identity data mapping derived from the table's schema is used. |
Note
Select Create.
Warning
In case of a manual failover, recreate the data connection.
To remove the IoT Hub connection from the Azure portal, do the following:
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Learning path
Data analysis in Azure Data Explorer with Kusto Query Language - Training
Learn how to analyze data in Azure Data Explorer using the Kusto Query Language
Certification
Microsoft Certified: Azure Data Engineer Associate - Certifications
Demonstrate understanding of common data engineering tasks to implement and manage data engineering workloads on Microsoft Azure, using a number of Azure services.
Documentation
Ingest from IoT Hub - Azure Data Explorer
This article describes Ingest from IoT Hub in Azure Data Explorer.
Export data to Azure Data Explorer - Azure IoT Central
Learn how to use the IoT Central data export capability to continuously export your IoT data to Azure Data Explorer
Tutorial - Visualize IoT device data from IoT Hub using Azure Web PubSub service and Azure Functions
A tutorial to walk through how to use Azure Web PubSub service and Azure Functions to monitor device data from IoT Hub.