title | description | ms.reviewer | ms.author | author | ms.topic | ms.custom | ms.date | ms.search.form | zone_pivot_group_filename | zone_pivot_groups |
---|---|---|---|---|---|---|---|---|---|---|
Add Azure IoT Hub source to an eventstream |
Learn how to add an Azure IoT Hub source to an eventstream. |
spelluru |
zhenxilin |
alexlzx |
how-to |
11/18/2024 |
Source and Destination |
real-time-intelligence/event-streams/zone-pivot-groups.json |
event-streams-standard-enhanced |
This article shows you how to add an Azure IoT Hub source to an eventstream.
[!INCLUDE select-view]
::: zone pivot="enhanced-capabilities"
Before you start, you must complete the following prerequisites:
- Access to a workspace in the Fabric capacity license mode (or) the Trial license mode with Contributor or higher permissions.
- You need to have appropriate permission to get IoT hub's access keys. If your Iot hub is within a protected network, connect to it using a managed private endpoint. Otherwise, ensure the Iot hub is publicly accessible and not behind a firewall.
- If you don't have an eventstream, create an eventstream.
[!INCLUDE launch-connect-external-source]
On the Select a data source page, search for and select Connect on the Azure IoT Hub tile.
:::image type="content" source="./media/add-source-azure-iot-hub-enhanced/select-azure-iot-hub.png" alt-text="Screenshot that shows the selection of Azure IoT Hub as the source type in the Get events wizard." lightbox="./media/add-source-azure-iot-hub-enhanced/select-azure-iot-hub.png":::
[!INCLUDE azure-iot-hub-connector]
[!INCLUDE sources-destinations-note]
-
You see that the Azure IoT Hub source is added to your eventstream on the canvas in the Edit mode. To implement this newly added Azure IoT hub, select Publish on the ribbon.
:::image type="content" source="./media/add-source-azure-iot-hub-enhanced/publish.png" alt-text="Screenshot that shows the editor with Publish button selected.":::
-
After you complete these steps, the Azure IoT hub is available for visualization in the Live view. Select the IoT hub tile in the diagram to see the page similar to the following one.
:::image type="content" source="./media/add-source-azure-iot-hub-enhanced/live-view.png" alt-text="Screenshot that shows the editor in the live view.":::
For a list of supported sources, see Add an event source in an eventstream
::: zone-end
::: zone pivot="standard-capabilities"
Before you start, you must complete the following prerequisites:
- Access to a workspace in the Fabric capacity license mode (or) the Trial license mode with Contributor or higher permissions.
- You need to have appropriate permission to get IoT hub's access keys. The IoT hub must be publicly accessible and not behind a firewall or secured in a virtual network.
[!INCLUDE sources-destinations-note]
Follow these steps to add an Azure IoT hub as your eventstream source:
-
In the Eventstream editor, expand the New source drop-down menu within the node and choose Azure IoT Hub.
:::image type="content" source="./media/add-iot-hub-source/add-iot-hub-source.png" alt-text="Screenshot that shows where to add an Azure IoT Hub source in the eventstream.":::
-
On the Azure IoT Hub configuration pane, enter the following details:
:::image type="content" source="./media/add-iot-hub-source/iot-hub-configuration-pane.png" alt-text="Screenshot that shows where to configure Azure IoT Hub in the eventstream.":::
-
Source name: Enter a name for your Azure IoT Hub, such as iothub-source.
-
Cloud connection: Select an existing cloud connection that links your Azure IoT Hub to Microsoft Fabric. If you don't have one, proceed to step 3 to create a new cloud connection.
-
Data format. Choose a data format (AVRO, JSON, or CSV) for streaming your IoT Hub data into the eventstream.
-
Consumer group. Choose a consumer group from your Azure IoT Hub, or leave it as $Default. Then select Add to finish the Azure IoT Hub configuration.
-
Once it adds successfully, you can see an Azure IoT Hub source added to your eventstream in the editor.
:::image type="content" source="./media/add-iot-hub-source/successfully-added-iot-hub.png" alt-text="Screenshot that shows the Azure IoT Hub source in the Eventstream editor.":::
-
-
To create a new cloud connection for your Azure IoT Hub, follow these steps:
:::image type="content" source="./media/add-iot-hub-source/create-new-cloud-connection.png" alt-text="Screenshot that shows where to create a new cloud connection.":::
-
Select Create new connection from the drop-down menu, fill in the Connection settings and Connection credentials of your Azure IoT Hub, and then select Create.
:::image type="content" source="./media/add-iot-hub-source/add-new-cloud-connection.png" alt-text="Screenshot that shows where to configure a new cloud connection." lightbox="./media/add-manage-eventstream-sources/eventstream-eventhub-source-cloud-connection.png":::
-
IoT Hub. Enter the name of the IoT Hub in the Azure portal.
-
Connection name. Enter a name for the new cloud connection, such as iothub-connection.
-
Shared access key name and Shared access key. Enter the connection credentials for your Azure IoT Hub. You can find it under Shared access policies in the Azure portal. You must have appropriate permissions to access any of the IoT Hub endpoints.
:::image type="content" source="./media/add-iot-hub-source/shared-access-key.png" alt-text="Screenshot that shows where to find the shared access key in the Azure portal." lightbox="./media/add-iot-hub-source/shared-access-key.png":::
-
Return to the Azure IoT Hub configuration pane and select Refresh to load the new cloud connection.
:::image type="content" source="./media/add-iot-hub-source/refresh-iot-hub-connection.png" alt-text="Screenshot that shows where to refresh the cloud connection for Azure IoT Hub.":::
-
Once the Azure IoT Hub is added to your eventstream, select Preview data to verify successful configuration. You should be able to preview incoming data to your eventstream.
:::image type="content" source="./media/add-iot-hub-source/preview-iot-hub-data.png" alt-text="Screenshot that shows where to preview IoT Hub data." lightbox="./media/add-iot-hub-source/shared-access-key.png":::
To learn how to add other sources to an eventstream, see the following articles:
::: zone-end