You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/digital-twins/how-to-ingest-iot-hub-data.md
+12-10Lines changed: 12 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ When the twin is created successfully, the CLI output from the command should lo
98
98
99
99
## Create a function
100
100
101
-
In this section, you'll create an Azure function to access Azure Digital Twins and update twins based on IoT telemetry events from IoT Hub. Follow the steps below to create and publish the function.
101
+
In this section, you'll create an Azure function to access Azure Digital Twins and update twins based on IoT telemetry events that it receives. Follow the steps below to create and publish the function.
102
102
103
103
#### Step 1: Create a function app project
104
104
@@ -129,17 +129,19 @@ Next, **assign an access role** for the function and **configure the application
129
129
130
130
## Connect your function to IoT Hub
131
131
132
-
Set up an event destination for hub data.
132
+
In this section, you'll set up your function as an event destination for the IoT hub device data. This will ensure that the data from the device in IoT Hub will be sent to the Azure function for processing.
133
+
133
134
In the [Azure portal](https://portal.azure.com/), navigate to your IoT Hub instance that you created in the [*Prerequisites*](#prerequisites) section. Under **Events**, create a subscription for your function.
134
135
135
136
:::image type="content" source="media/how-to-ingest-iot-hub-data/add-event-subscription.png" alt-text="Screenshot of the Azure portal that shows Adding an event subscription.":::
136
137
137
138
In the **Create Event Subscription** page, fill the fields as follows:
138
-
1. Under **Name**, name the subscription what you would like.
139
-
2. Under **Event Schema**, choose _Event Grid Schema_.
140
-
3. Under **Event Types**, choose the _Device Telemetry_ checkbox and uncheck other event types.
141
-
4. Under **Endpoint Type**, Select _Azure Function_.
142
-
5. Under **Endpoint**, Choose _Select an endpoint_ link to create an endpoint.
139
+
1. For **Name**, choose whatever name you want for the event subscription.
140
+
2. For **Event Schema**, choose _Event Grid Schema_.
141
+
3. For **System Topic Name**, choose whatever name you want.
142
+
1. For **Filter to Event Types**, choose the _Device Telemetry_ checkbox and uncheck other event types.
143
+
1. For **Endpoint Type**, Select _Azure Function_.
144
+
1. For **Endpoint**, use the _Select an endpoint_ link to choose what Azure Function to use for the endpoint.
143
145
144
146
:::image type="content" source="media/how-to-ingest-iot-hub-data/create-event-subscription.png" alt-text="Screenshot of the Azure portal to create the event subscription details":::
145
147
@@ -148,13 +150,13 @@ In the _Select Azure Function_ page that opens up, verify the below details.
148
150
2.**Resource group**: Your resource group.
149
151
3.**Function app**: Your function app name.
150
152
4.**Slot**: _Production_.
151
-
5.**Function**: Select your function from the dropdown.
153
+
5.**Function**: Select the function from earlier, *IoTHubtoTwins*, from the dropdown.
152
154
153
-
Save your details by selecting_Confirm Selection_ button.
155
+
Save your details with the_Confirm Selection_ button.
154
156
155
157
:::image type="content" source="media/how-to-ingest-iot-hub-data/select-azure-function.png" alt-text="Screenshot of the Azure portal to select the function.":::
156
158
157
-
Select _Create_ button to create event subscription.
159
+
Select the _Create_ button to create the event subscription.
0 commit comments