Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article shows you how to add an Azure IoT Hub source to a Microsoft Fabric eventstream.
Note
Enhanced capabilities are enabled by default when you create eventstreams. If you have eventstreams that you created via standard capabilities, those eventstreams will continue to work. You can still edit and use them as usual. We recommend that you create a new eventstream to replace standard eventstreams so that you can take advantage of additional capabilities and benefits of enhanced eventstreams.
Prerequisites
- Access to a workspace in the Fabric capacity license mode or trial license mode with Contributor or higher permissions.
- Appropriate permission to get your IoT hub's access keys. If your IoT hub is within a protected network, connect to it by using a managed private endpoint. Otherwise, ensure that the IoT hub is publicly accessible and not behind a firewall.
- An eventstream. If you don't have an eventstream, create one.
Start the wizard for selecting a data source
If you haven't added any source to your eventstream yet, select the Use external source tile.
If you're adding the source to an already published eventstream, switch to Edit mode. On the ribbon, select Add source > External sources.
On the Select a data source page, search for Azure IoT Hub. On the Azure IoT Hub tile, select Connect.
Configure an Azure IoT Hub connector
On the Connect page, select New connection.
If there's an existing connection to your IoT hub, select that existing connection, and then move on to configuring Data format in the following steps.
In the Connection settings section, for IoT Hub, specify the name of your IoT hub.
In the Connection credentials section, follow these steps:
If there's an existing connection, select it from the dropdown list. If not, confirm that Create new connection is selected for this option.
For Connection name, enter a name for the connection to the IoT hub.
For Authentication kind, confirm that Shared Access Key is selected.
For Shared Access Key Name, enter the name of the shared access key.
For Shared Access Key, enter the value of the shared access key.
To get the name and value of the shared access key, follow these steps:
- Go to the page for your IoT hub in the Azure portal.
- On the left pane, under Security settings, select Shared access policies.
- Select a policy name from the list. Note down the policy name.
- Select the copy button next to the Primary key.
Select Connect.
For Consumer group, enter the name of the consumer group. The default consumer group for the IoT hub is $Default.
For Data format, select a data format for the incoming real-time events that you want to get from your IoT hub. You can select from JSON, Avro, and CSV data formats. Then select Connect.
In the Stream details section on the right, select the pencil icon under Source name, and then enter a name for the source. This step is optional.
Select Next at the bottom of the page.
On the Review and create page, review your settings, and then select Add.
Note
An eventstream can support up to 11 combined sources and destinations only when you're using the following types:
- Source: Custom endpoint.
- Destinations: Custom endpoint and eventhouse with direct ingestion.
Any sources or destinations not included in the preceding list, and destinations not appended to the default stream, don't count toward this limit.
View an updated eventstream
Confirm that the Azure IoT Hub source is added to your eventstream on the canvas in the Edit mode. To implement this newly added IoT hub, select Publish on the ribbon.
The IoT hub is available for visualization in the Live view. Select the IoT hub tile in the diagram to display a page similar to the following example.
Related content
- For a list of supported sources, see Add and manage an event source in an eventstream.
Prerequisites
- Access to a workspace in the Fabric capacity license mode or trial license mode with Contributor or higher permissions.
- Appropriate permission to get your IoT hub's access keys. The IoT hub must be publicly accessible and not behind a firewall or secured in a virtual network.
Note
An eventstream can support up to 11 combined sources and destinations only when you're using the following types:
- Source: Custom endpoint.
- Destinations: Custom endpoint and eventhouse with direct ingestion.
Any sources or destinations not included in the preceding list, and destinations not appended to the default stream, don't count toward this limit.
Add an IoT hub as a source
Follow these steps to add an IoT hub as your eventstream source:
In the eventstream editor, expand the New source dropdown menu within the node and select Azure IoT Hub.
On the Azure IoT Hub configuration pane, enter the following details. Then select Add to finish the configuration.
- Source name: Enter a name for your IoT hub, such as iothub-source.
- Cloud connection: Select an existing cloud connection that links your IoT hub to Microsoft Fabric. If you don't have one, proceed to step 4 to create a new cloud connection.
- Consumer group: Choose a consumer group from your IoT hub, or leave it as $Default.
- Data format: Choose a data format (Avro, JSON, or CSV) for streaming your IoT hub data into the eventstream.
Confirm that an Azure IoT Hub source is added to your eventstream in the editor.
To create a new cloud connection for your IoT hub, follow these steps:
On the dropdown menu, select Create new.
For IoT Hub, enter the name of the IoT hub in the Azure portal.
For Connection name, enter a name for the new cloud connection, such as iothub-connection.
For Shared access key name and Shared access key, enter the connection credentials for your IoT hub. You can find them under Shared access policies in the Azure portal. You must have appropriate permissions to access any of the Azure IoT Hub endpoints.
Select Create.
Return to the Azure IoT Hub configuration pane and select Refresh to load the new cloud connection.
After the 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.
Related content
To learn how to add other sources to an eventstream, see the following articles: