Skip to content

Commit 255ae2e

Browse files
committed
Edits
1 parent 92154a0 commit 255ae2e

File tree

4 files changed

+27
-28
lines changed

4 files changed

+27
-28
lines changed
1.4 KB
Loading
17 KB
Loading
40.8 KB
Loading

articles/digital-twins/quickstart-azure-digital-twins-explorer.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,21 @@ ms.custom: mode-other, event-tier1-build-2022
1212

1313
# Quickstart - Get started with a sample scenario in Azure Digital Twins Explorer
1414

15-
This quickstart is an introduction to Azure Digital Twins, showing how Azure Digital Twins represents data and demonstrating what it's like to interact with a digital *twin graph* of a physical building. You'll use the [Azure portal site](https://portal.azure.com) and the [Azure Digital Twins Explorer](concepts-azure-digital-twins-explorer.md), which is a tool for visualizing and interacting with your Azure Digital Twins data in a web browser.
15+
This quickstart is an introduction to Azure Digital Twins, showing how Azure Digital Twins represents data and demonstrating what it's like to interact with a digital twin graph of a physical building. You'll use the [Azure portal site](https://portal.azure.com) and the [Azure Digital Twins Explorer](concepts-azure-digital-twins-explorer.md), which is a tool for visualizing and interacting with Azure Digital Twins data in a web browser.
1616

17-
In this quickstart, you'll look at pre-built sample *models* that digitally define the concepts of a *Building*, a *Floor*, and a *Room*, and use these model definitions to create digital *twins* that represent specific floors and rooms from a physical building. These individual twin elements will be connected into a virtual *twin graph* that reflects their relationships to each other, to form a complete digital representation of the sample building. The sample graph you'll be working with represents a building that contains two floors, and each floor contains one room. The graph will look like this image:
17+
In this quickstart, you'll look at pre-built sample **models** that digitally define the concepts of a *Building*, a *Floor*, and a *Room*, and use these model definitions to create **digital twins** that represent specific floors and rooms from a physical building. These individual twins will be connected into a virtual **twin graph** that reflects their relationships to each other, forming a complete digital representation of the sample building. The graph you'll be working with represents a building that contains two floors, and each floor contains rooms. The graph will look like this image:
1818

1919
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/graph-view-2.png" alt-text="Screenshot of a graph made of four circular nodes connected by arrows in Azure Digital Twins Explorer.":::
2020

2121
Here are the steps you'll use to explore the graph in this article:
2222

2323
1. Create an Azure Digital Twins instance, and open it in Azure Digital Twins Explorer.
24-
1. Upload prebuilt models and graph data to construct the sample scenario.
25-
1. Explore and expand the sample graph.
24+
1. Upload pre-built models and graph data to construct the sample scenario. Add one more twin manually.
2625
1. Simulate changing IoT data, and query the graph to see results.
2726
1. Review your learnings from the experience.
2827

2928
>[!NOTE]
30-
>For simplicity, this quickstart does not cover setup of a live data flow from IoT devices inside the modeled environment. To set up a simulated end-to-end data flow that drives your twin graph, move ahead to the tutorials: [Connect an end-to-end solution](tutorial-end-to-end.md). For more information on data flow between services and integrating Azure Digital Twins into a wider IoT solution, see [Data ingress and egress](concepts-data-ingress-egress.md).
29+
>For simplicity, this quickstart does not cover setting up a live data flow from IoT devices inside the modeled environment. To set up a simulated end-to-end data flow that drives your twin graph, move ahead to the tutorials: [Connect an end-to-end solution](tutorial-end-to-end.md). For more information on data flow between services and integrating Azure Digital Twins into a wider IoT solution, see [Data ingress and egress](concepts-data-ingress-egress.md).
3130
3231
## Prerequisites
3332

@@ -80,19 +79,19 @@ In Azure Digital Twins Explorer, follow these steps to upload the *Building*, *F
8079
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/upload-model.png" alt-text="Screenshot of the Azure Digital Twins Explorer, highlighting the Models panel and the 'Upload a Model' icon in it." lightbox="media/quickstart-azure-digital-twins-explorer/upload-model.png":::
8180

8281
1. In the Open window that appears, navigate to the folder containing the downloaded *.json* files on your machine.
83-
1. Select *Building.json*, *Floor.json*, and *Room.json* , and select **Open** to upload them all at once.
82+
1. Select *Building.json*, *Floor.json*, and *Room.json*, and select **Open** to upload them all at once.
8483

8584
Azure Digital Twins Explorer will upload these model files to your Azure Digital Twins instance. They should show up in the **Models** panel and display their friendly names and full model IDs.
8685

87-
You can select **View Model** for either model to see the DTDL code that defines each model type.
86+
You can select **View Model** from any of the models' options to see the DTDL code that defines each model type.
8887

8988
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/model-info.png" alt-text="Screenshot of the Azure Digital Twins Explorer showing the Models panel with three model definitions listed inside: Building, Floor, and Room." lightbox="media/quickstart-azure-digital-twins-explorer/model-info.png":::
9089

9190
### Twins and the twin graph
9291

9392
Now that some model definitions have been uploaded to your Azure Digital Twins instance, you can use these definitions to create *digital twins* for the elements in your environment.
9493

95-
Every digital twin in your solution represents an entity from the physical environment. You can create many twins based on the same model type, like multiple room twins that all use the *Room* model. In this quickstart, you'll need a digital twin for the building, and a digital twin for each floor and room in the building. The twins will be connected with relationships into a *twin graph* that represents the full sample building environment.
94+
Every digital twin in your solution represents an entity from the physical environment. You can create many twins based on the same model type, like multiple room twins that all use the *Room* model. In this quickstart, you'll need a digital twin for the building, and a digital twin for each floor and room in the building. The twins will be connected with relationships into a *twin graph* that represents the full building environment.
9695

9796
In this section, you'll upload a pre-created graph containing a building twin, two floor twins, and two room twins.
9897

@@ -124,31 +123,31 @@ In Azure Digital Twins Explorer, follow these steps to import the sample graph (
124123

125124
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/run-query.png" alt-text="Screenshot of the Azure Digital Twins Explorer highlighting the 'Run Query' button in the upper-right corner of the window." lightbox="media/quickstart-azure-digital-twins-explorer/run-query.png":::
126125

127-
This action runs the default query to select and display all digital twins. Azure Digital Twins Explorer retrieves all twins and relationships from the service. It draws the graph defined by them in the **Twin Graph** panel.
128-
129-
Now you can see the uploaded graph of the sample scenario. The circles (graph "nodes") represent digital twins. The lines represent relationships. The BuildingA twin "contains" the Floor0 and Floor1 twins, the Floor0 twin "contains" Room0, and the Floor1 twin "contains" Room1. If you're using a mouse, you can click and drag in the graph to move elements around.
126+
This action runs the default query to select and display all digital twins. Azure Digital Twins Explorer retrieves all twins and relationships from the service. It draws the graph defined by them in the **Twin Graph** panel. Now you can see the uploaded graph of the sample scenario.
130127

131128
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/graph-view-1.png" alt-text="Screenshot of Azure Digital Twins Explorer showing the uploaded graph.'":::
132129

130+
The circles (graph "nodes") represent digital twins. The lines represent relationships. The BuildingA twin "contains" the Floor0 and Floor1 twins, the Floor0 twin "contains" Room0, and the Floor1 twin "contains" Room1. If you're using a mouse, you can click and drag in the graph to move around elements.
131+
133132
#### Add another twin
134133

135-
You can continue to edit the structure of a digital twin graph after its initial creation. Imagine that another room has recently been constructed on Floor1 of this example building. In this section, you'll add a new twin to the graph, to represent the new room.
134+
You can continue to edit the structure of a digital twin graph after it's been created. Imagine that another room has recently been constructed on Floor1 of this example building. In this section, you'll add a new twin to the graph, to represent the new room.
136135

137136
Start by selecting the model that defines the type of twin you want to create. In the **Models** panel on the left, open the options menu for the **Room** model. Select **Create a Twin** to create a new instance of this model type.
138137

139138
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/create-twin.png" alt-text="Screenshot of the Azure Digital Twins Explorer showing the Models panel, and the option to Create a Twin from the Room model." lightbox="media/quickstart-azure-digital-twins-explorer/create-twin.png":::
140139

141140
Enter *Room2* for the **New Twin name** and select **Save**. This will create a new digital twin, which is not yet connected by relationships to the rest of the graph.
142141

143-
Next, you'll add a relationship to express that Floor1 contains Room2. Use the CTRL/CMD or SHIFT keys to simultaneously select Floor1 and Room2 in the graph. When both twins are selected, right-click Room2 and choose **Add relationships**.
142+
Next, you'll add a relationship to show that Floor1 contains Room2. Use the CTRL/CMD or SHIFT keys to simultaneously select Floor1 and Room2 in the graph. When both twins are selected, right-click Room2 and choose **Add relationships**.
144143

145144
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/add-relationships.png" alt-text="Screenshot of the Azure Digital Twins Explorer, adding a relationship between Floor1 and Room2." lightbox="media/quickstart-azure-digital-twins-explorer/add-relationships.png":::
146145

147-
This will open a **Create Relationship** dialog that's pre-filled with the details of a "contains"-type relationship from Floor1 to Room2. Select **Save**.
146+
This will open a **Create Relationship** dialog that's pre-filled with the details of a "contains" relationship from Floor1 to Room2. Select **Save**.
148147

149148
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/create-relationship-save.png" alt-text="Screenshot of the Create Relationship options." lightbox="media/quickstart-azure-digital-twins-explorer/create-relationship-save.png":::
150149

151-
Now Room2 is a connected part of the graph. If you're using a mouse, you can click and drag twins in the graph to arrange them in a configuration that you like.
150+
Now Room2 is connected in the graph. If you're using a mouse, you can click and drag twins in the graph to arrange them into a configuration that you like.
152151

153152
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/graph-view-2.png" alt-text="Screenshot of Azure Digital Twins Explorer showing the graph, which now includes Room2.'":::
154153

@@ -164,36 +163,36 @@ Here are the properties of Room1. Notice that Room1 has a temperature of 80.
164163

165164
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/properties-room1.png" alt-text="Screenshot of the Azure Digital Twins Explorer highlighting the Twin Properties panel, which shows $dtId, Temperature, and Humidity properties for Room1." lightbox="media/quickstart-azure-digital-twins-explorer/properties-room1.png":::
166165

167-
Room2 doesn't have values set for its properties yet, since this twin was created manually. To set values for its properties, edit the fields so that humidity is 50 and temperature is 72. Select the **Save** icon.
166+
Room2 doesn't have values set for its properties yet, since this twin was created manually. To set its property values, edit the fields so that humidity is 50 and temperature is 72. Select the **Save** icon.
168167

169168
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/properties-room2.png" alt-text="Screenshot of the Azure Digital Twins Explorer highlighting the Twin Properties panel, where Temperature and Humidity are being set for Room2." lightbox="media/quickstart-azure-digital-twins-explorer/properties-room2.png":::
170169

171-
## Query changing data
170+
## Query changing IoT data
172171

173-
In Azure Digital Twins, you can query your twin graph to answer questions about your environment, using the SQL-style *Azure Digital Twins query language*. One way to query the twins in your graph is by their properties. Querying based on properties can help answer questions about—or identify outliers in—your environment. In a fully-connected, data-driven scenario, the properties of your twins will change frequently in response to IoT data from the sensors in your environment. In this quickstart, you'll change the values manually to simulate a changing sensor reading.
172+
In Azure Digital Twins, you can query your twin graph to answer questions about your environment, using the SQL-style *Azure Digital Twins query language*. One way to query the twins in your graph is by their properties. Querying based on properties can help answer questions about—or identify outliers in—your environment. In a fully connected, data-driven scenario, the properties of your twins will change frequently in response to IoT data from the sensors in your environment. In this quickstart, you'll change the values manually to simulate a changing sensor reading.
174173

175-
Start by running a query to answer the question of how many twins in your environment have a temperature above 75. Run the following query in the **Query Explorer** panel.
174+
Start by running a query to see how many twins in your environment have a temperature above 75. Run the following query in the **Query Explorer** panel.
176175

177176
:::code language="sql" source="~/digital-twins-docs-samples/queries/examples.sql" id="TemperatureQuery":::
178177

179-
Recall from viewing the twin properties earlier that Room0 has a temperature reading of 70, Room1 has a temperature reading of 80, and Room2 has a temperature reading of 72. The building and floor twins don't have a Temperature property at all. For these reasons, only Room1 shows up in the results here.
178+
Recall from viewing the twin properties earlier that Room0 has a temperature reading of 70, Room1 has a temperature reading of 80, and Room2 has a temperature reading of 72. The building and floor twins don't have a temperature property at all. For these reasons, only Room1 shows up in the results here.
180179

181180
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/result-query-property-before.png" alt-text="Screenshot of the Azure Digital Twins Explorer showing the results of property query, which shows only Room1." lightbox="media/quickstart-azure-digital-twins-explorer/result-query-property-before.png":::
182181

183182
>[!TIP]
184-
> Other comparison operators (<,>, =, or !=) are also supported within the preceding query. You can try plugging these operators, different values, or different twin properties into the query to try out answering your own questions.
183+
> Other comparison operators (<,>, =, or !=) are also supported in queries. You can try plugging these operators, different values, or different twin properties into the query to try out answering your own questions.
185184
186185
### Edit temperature data
187186

188-
In a fully-connected Azure Digital Twins solution, the twins in your graph can receive live updates from real IoT devices and update their properties to stay synchronized with your real-world environment. You can also manually set the properties of the twins in your graph, using Azure Digital Twins Explorer or another development interface (like the APIs or Azure CLI). For simplicity, you'll use Azure Digital Twins Explorer here to manually set the temperature reading of Room0 to 76.
187+
In a fully connected Azure Digital Twins solution, the twins in your graph receive live updates from real IoT devices, and update their properties automatically to stay synchronized with your real-world environment. For simplicity in this quickstart, you'll use Azure Digital Twins Explorer here to manually set the temperature reading of Room0 to 76.
189188

190-
First, rerun the following query to select all digital twins. This will display the full graph once more in the **Twin Graph** panel.
189+
First, rerun the following query to select all digital twins. This will display the full graph again in the **Twin Graph** panel.
191190

192191
:::code language="sql" source="~/digital-twins-docs-samples/queries/examples.sql" id="GetAllTwins":::
193192

194193
Select **Room0** to bring up its property list in the **Twin Properties** panel.
195194

196-
The properties in this list are editable. Select the temperature value of **70** to enable entering a new value. Enter *76* and select the **Save** icon to update the temperature.
195+
Change the temperature value from **70** to *76*, and select the **Save** icon to update the temperature.
197196

198197
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/new-properties-room0.png" alt-text="Screenshot of the Azure Digital Twins Explorer highlighting that the Twin Properties panel is showing properties that can be edited for Room0." lightbox="media/quickstart-azure-digital-twins-explorer/new-properties-room0.png":::
199198

@@ -205,7 +204,7 @@ After a successful property update, you'll see a **Patch Information** box showi
205204

206205
### Query to see the new result
207206

208-
To verify that the graph successfully registered your update to the temperature for Room0, rerun the query from earlier to get all the twins in the environment with a temperature above 75.
207+
To see the new temperature for Room0 reflected in the graph, rerun the query from earlier to get all the twins in the environment with a temperature above 75.
209208

210209
:::code language="sql" source="~/digital-twins-docs-samples/queries/examples.sql" id="TemperatureQuery":::
211210

@@ -217,13 +216,13 @@ Now that the temperature of Room0 has been changed from 70 to 76, both Room0 and
217216

218217
In this quickstart, you created an Azure Digital Twins instance and used Azure Digital Twins Explorer to populate it with a sample scenario. You also added a digital twin manually.
219218

220-
You then explored the graph, by:
219+
Then, you explored the graph, including...
221220

222221
* Using a query to answer a question about the scenario.
223222
* Editing a property on a digital twin.
224223
* Running the query again to see how the answer changed as a result of your update.
225224

226-
The intent of this exercise is to demonstrate how you can use the Azure Digital Twins graph to answer questions about your environment, even as the environment continues to change.
225+
The intent of this exercise is to demonstrate how you can use the Azure Digital Twins graph to answer questions about your environment, especially as IoT environments continue to change.
227226

228227
In this quickstart, you made the temperature update manually. It's common in Azure Digital Twins to connect digital twins to real IoT devices so that they receive updates automatically, based on telemetry data. In this way, you can build a live graph that always reflects the real state of your environment. You can use queries to get information about what's happening in your environment in real time.
229228

@@ -243,7 +242,7 @@ To clean up after this quickstart, choose which Azure Digital Twins resources yo
243242

244243
:::image type="content" source="media/quickstart-azure-digital-twins-explorer/delete-instance.png" alt-text="Screenshot of the Overview page for an Azure Digital Twins instance in the Azure portal. The Delete button is highlighted.":::
245244

246-
You may also want to delete the sample project folder from your local machine.
245+
You may also want to delete the sample project files from your local machine.
247246

248247
## Next steps
249248

0 commit comments

Comments
 (0)