top of page
  • Turing Challenge

How to implement IoT with Microsoft Azure? – Azure Digital Twins and Azure Data Explorer

This technical article presents the Microsoft Azure ecosystem for projects on digital twins and the Internet of Things (IoT). It focuses on two technologies, Azure Digital Twins (ADT) and Azure Data Explorer (ADX), and on their connection through ADT Data history.

Introduction to Azure Digital Twins and Azure Data Explorer

Azure Digital Twins (ADT) is an IoT service by Microsoft. This platform enables users to create digital representations of real-life objects such as sensors thanks to a graph with properties. It’s a disruptive service that allows you to obtain insights and organize and contextualize data. This helps you take business decisions.

Microsoft Azure is promoting the connection between Azure Digital Twins and Azure Data Explorer (ADX). ADX is a database service recently created by Microsoft for saving massive data either in batch or in streaming (up to GBs per hour and table). ADX is specially designed for temporal series, which is the most frequent scenario in IoT projects. Nonetheless, it can be used in almost any other situation.

ADT Data history: the update connecting ADT and ADX

Before April 2022, the connection between ADT and ADX was somehow tricky. It was necessary to create a connection from ADX to ADT. Data was saved by default in a not very structured way since a single column always contained the whole message from ADT. The only way to avoid this data structure was to create in ADX a series of inconvenient mappings. This fix would however add complexity and computation to the system.

Data history, the new update of Azure Digital Twins, tries to solve these obstacles. You could use it in Public preview since April 2022, but it’s now available in General availability since July 20th, 2022. It brings two really interesting benefits regarding data integration:

  • On the one hand, data are structured automatically in the database with no need to perform a mapping in ADX. This feature reduces the time the expert invests in development.

  • On the other hand, this standard structure makes contextualizing data much easier. In this way, it helps you obtain insights and implement business logic.

Besides, this update also brings new functionalities and changes that allow you to save much more data. For example, it enables you to automatically save the relationships between the digital twins.

What benefits does this technology offer you?

Using Azure Digital Twins together with Azure Data Explorer allows you to obtain many benefits for IoT and AIoT systems (combination of AI and IoT).

Benefits when data saving:

  • Saving in a standardized format with no code requires.

  • Saving in a streaming and big data database specialized in time series (ADX).

Benefits for the system:

  • Native connection between ADT and ADX to obtain insights into the physical object.

  • Possibility to apply business logics from the relationships between physical objects.

Benefits in terms of functionality/costs:

  • ADX is the most suitable database for streaming and big data thanks to its great capacities for ingesting and consulting data. In this respect, it’s far superior to other solutions such as SQL Hyperscale or CosmosDB.

  • The cost of ADX isn’t prohibitive if compared to its alternatives, especially considering it’s a cluster-based database that can scale with practically no limitations.

  • ADX lets you look up data in Kusto language. Kusto is the language developed by Microsoft for logs and big data queries, so it’s very efficient.

  • ADT isn’t a costly tool and it’s very useful for ordering and contextualizing data.

Therefore, Azure Digital Twins and Azure Data Explorer make an interesting duo that will set the course for future IoT in Azure.

What can we use this technology for?

This technology can be used for almost every IoT application you may think of. It’s especially interesting for solutions involving modeling reality and applying business logics. Thermostats are a typical and simple example: you could assign them digital twins to automatically regulate the temperature.

Let’s take a more complex example. Imagine a network of road radars that must report to police stations. In the graph, we could store the latest information on each radar and police station. Furthermore, we could also keep information on the relationships between radars and the police station they belong to. In this way, the information would always be reported to the pertinent police station.

In real life, this data on radars, police stations, or their relationships is likely to change at some point. In that case, the graph would be consequently modified. Thanks to that, the whole system would still reflect the new situation. Even more, the potential of Azure Digital Twins and Azure Data Explorer would allow you to model the entire radar network of a country without much effort in terms of cost or code.

As you can appreciate in this example, this technology can be applied to nearly any system using IoT. Its user-friendliness allows you to take a leap forward in terms of the quality of company systems, data ordering, and insight obtention.

A practical example: a digital twin of LaLiga (Spanish soccer league)

Jorge de Andrés, AI Data Scientist at Turing Challenge, has made a demo to show in more detail how this technology works. The demo is based on soccer players to simplify the problem. Six soccer players from the Spanish league (LaLiga) have been modeled in Azure Digital Twins. As you can see in the image below, the players are related to their respective teams –which are related in turn to LaLiga– and their national federations.

In just a matter of minutes, Jorge entered data on the speed these players were running during a match. These data are sent to Azure Digital Twins and are saved thanks to Azure Data Explorer Data History. You can see the resulting data in the picture below. As you can appreciate, we have the timestamps indicating when the data was added, the name of the players, and the speed they were running at.

We can contextualize the data we have fed in the database regarding the Digital Twins graph with some interesting queries that allow us to get data insights. For example, we can compare the players in Real Madrid by their speed.

This query is executed on the database, while the graph remains in ADT. Therefore, the graph is always updated with the database. This way, the digital twin works as a faithful representation of reality. Accordingly, it can be adapted to the business needs.

With another query, we could also compare the average speed of the three teams that are modeled. Remarkably, gaining insights from the database is relatively easy. This is enabled by the contextualization brought by the combination of ADT and ADX.

Why Turing Challenge?

Turing Challenge is a company based in Madrid that offers AI and IoT solutions.

We’re one of the first Spanish companies to work with Azure Digital Twins and Azure Data Explorer. We’re also innovators in exploiting data history, the connection between ADT and ADX discussed in this article.



bottom of page