Example
This example demonstrates how to use this Action Agent to send simple pump data readings to Azure Digital Twins. This would allow current data to be stored for later retrieval for contextualization.
Drag the Azure Digital Twin Action Agent onto the canvas, link the input endpoint to pump readings. Rename the Agent and save the Data Stream.

Select the Agent and click Configure. In this case, keep the default Collection.

Tick to use variables. Set the Subscription Id, Tenant Id, Client Id and Client Secret.

We're going to create a Digital Twins instance. Go to setting the Digital Twins Host Name if you want to skip this step.
Click 'Create new resource' to open the Create New Resource blade.

Set the Resource Location, Resource Group, and Digital Twins Instance Name.
In this case, set Resource Location to australiaeast, Resource Group to XMDocs, and Digital Twins Instance Name to XMDTExample. Click Setup Infrastructure.

Apply the changes on the Create New Resource blade.

Set the Host Name to the Azure Digital Twin Host Name variable.

Click Upload new model.

Click Select File and select the DTDL Model file. Apply the changes.

Set Model Name to Pump.

Set Twin Id to PumpId.

Apply the changes and save the Data Stream.

Select the Azure Digital Twin's input arrow and click Configure.

Map one of the parent Agent's output attributes to each model attribute, which is fetched from the Azure model. Apply the changes and save the Data Stream.

Publish the Data Stream and let's look at the Live Data View. Observe the resulting events.

File | Link | Security Key |
---|---|---|
Data Stream | Azure DT Action Agent.xuc | C0mp|ex123 |
Sample Data | Azure DT Action Agent.csv | |
DTDL Model | Pump.json | |
Last modified 7h ago