, dealing with streaming knowledge was thought-about an avant-garde method. For the reason that introduction of relational database administration techniques within the Nineteen Seventies and conventional knowledge warehousing techniques within the late Eighties, all knowledge workloads started and ended with the so-called batch processing. Batch processing depends on the idea of amassing quite a few duties in a bunch (or batch) and processing these duties in a single operation.
On the flip facet, there’s a idea of streaming knowledge. Though streaming knowledge remains to be generally thought-about a cutting-edge expertise, it already has a strong historical past. The whole lot began in 2002, when Stanford College researchers revealed the paper referred to as “Models and Issues in Data Stream Systems”. Nevertheless, it wasn’t till virtually a decade later (2011) that streaming knowledge techniques began to achieve a wider viewers, when the Apache Kafka platform for storing and processing streaming knowledge was open-sourced. The remaining is historical past, as individuals say. These days, processing streaming knowledge shouldn’t be thought-about a luxurious however a necessity.
Microsoft acknowledged the rising have to course of the information “as quickly because it arrives”. Therefore, Microsoft Cloth doesn’t disappoint in that regard, as Actual-time Intelligence is on the core of your complete platform and gives an entire vary of capabilities to deal with streaming knowledge effectively.
Earlier than we dive deep into explaining every element of Actual-time Intelligence, let’s take one step again and take a extra tool-agnostic method to stream processing normally.
What’s stream processing?
If you happen to enter the phrase from the part title in Google Search, you’ll get greater than 100,000 outcomes! Due to this fact, I’m sharing an illustration that represents our understanding of stream processing.
Let’s now study typical use circumstances for stream processing:
- Fraud detection
- Actual-time inventory trades
- Buyer exercise
- Log monitoring — troubleshooting techniques, gadgets, and many others.
- Safety info and occasion administration — analyzing logs and real-time occasion knowledge for monitoring and risk detection
- Warehouse stock
- Trip share matching
- Machine studying and predictive analytics
As you might have seen, streaming knowledge has turn out to be an integral a part of quite a few real-life eventualities and is taken into account vastly superior to conventional batch processing for the aforementioned use circumstances.
Let’s now discover how streaming knowledge processing is carried out in Microsoft Cloth and which instruments of commerce we’ve got at our disposal.
The next illustration reveals the high-level overview of all Actual-time Intelligence elements in Microsoft Cloth:

Actual-Time hub
Let’s kick it off by introducing a Actual-Time hub. Each Microsoft Cloth tenant robotically provisions a Actual-Time hub. This can be a point of interest for all data-in-motion throughout your complete group. Much like OneLake, there may be one, and just one, Actual-Time hub per tenant — this implies, you’ll be able to’t provision or create a number of Actual-Time hubs.
The principle goal of the Actual-Time hub is to allow fast and simple discovery, ingestion, administration, and consumption of streaming knowledge from a variety of sources. Within the following illustration, you could find the overview of all the information streams within the Actual-Time hub in Microsoft Cloth:

Let’s now discover all of the accessible choices within the Actual-Time hub.
- All knowledge streams tab shows all of the streams and tables you’ll be able to entry. Streams symbolize the output from Cloth eventstreams, whereas tables come from KQL databases. We’ll discover each evenstreams and KQL databases in additional element within the following sections
- My knowledge streams tab reveals all of the streams you introduced into Microsoft Cloth into My workspace
- Knowledge sources tab is on the core of bringing the information into Cloth, each from inside and out of doors. As soon as you end up within the Knowledge sources tab, you’ll be able to select between quite a few, out-of-the-box offered connectors, reminiscent of Kafka, CDC streams for varied database techniques, exterior cloud options like AWS and GCP, and plenty of extra
- Microsoft sources tab filters out the earlier set of sources to incorporate Microsoft knowledge sources solely
- Cloth occasions tab shows the checklist of system occasions generated in Microsoft Cloth which you could entry. Right here, it’s possible you’ll select between Job occasions, OneLake occasions, and Workspace merchandise occasions. Let’s dive into every of those three choices:
- Job occasions are occasions produced by standing adjustments on Cloth monitor actions, reminiscent of job created, succeeded, or failed
- OneLake occasions symbolize occasions produced by actions on recordsdata and folders in OneLake, reminiscent of file created, deleted, or renamed
- Workspace merchandise occasions are produced by actions on workspace objects, reminiscent of merchandise created, deleted, or renamed
- Azure occasions tab reveals the checklist of system occasions generated in Azure blob storage
The Actual-Time hub supplies varied connectors for ingesting the information into Microsoft Cloth. It additionally permits creating streams for the entire supported sources. After the stream is created, you’ll be able to course of, analyze, and act on them.
- Processing a stream lets you apply quite a few transformations, reminiscent of mixture, filter, union, and plenty of extra. The aim is to rework the information earlier than you ship the output to supported locations
- Analyzing a stream lets you add a KQL database as a vacation spot of the stream, after which open the KQL Database and execute queries towards the database.
- Appearing on streams assumes setting the alerts based mostly on situations and specifying actions to be taken when sure situations are met
Eventstreams
If you happen to’re a low-code or no-code knowledge skilled and it’s good to deal with streaming knowledge, you’ll love Eventstreams. In a nutshell, Eventstream lets you connect with quite a few knowledge sources, which we examined within the earlier part, optionally apply varied knowledge transformation steps, and eventually output outcomes into a number of locations. The next determine illustrates a standard workflow for ingesting streaming knowledge into three totally different locations — Eventhouse, Lakehouse, and Activator:

Throughout the Eventstream settings, you’ll be able to regulate the retention interval for the incoming knowledge. By default, the information is retained for in the future, and occasions are robotically eliminated when the retention interval expires.
Other than that, you might also need to fine-tune the occasion throughput for incoming and outgoing occasions. There are three choices to select from:
- Low: < 10 MB/s
- Medium: 10-100 MB/s
- Excessive: > 100 MB/s
Eventhouse and KQL database
Within the earlier part, you’ve realized how to connect with varied streaming knowledge sources, optionally remodel the information, and eventually load it into the ultimate vacation spot. As you may need seen, one of many accessible locations is the Eventhouse. On this part, we’ll discover Microsoft Cloth objects used to retailer the information inside the Actual-Time Intelligence workload.
Eventhouse
We’ll first introduce the Eventhouse merchandise. The Eventhouse is nothing else however a container for KQL databases. Eventhouse itself doesn’t retailer any knowledge — it merely supplies the infrastructure inside the Cloth workspace for coping with streaming knowledge. The next determine shows the System overview web page of the Eventhouse:

The wonderful thing about the System overview web page is that it supplies all the important thing info at a look. Therefore, you’ll be able to instantly perceive the working state of the eventhouse, OneLake storage utilization, additional damaged down per particular person KQL database stage, compute utilization, most lively databases and customers, and up to date occasions.
If we change to the Databases web page, we will see a high-level overview of KQL databases which can be a part of the present Eventhouse, as proven beneath:

You possibly can create a number of eventhouses in a single Cloth workspace. Additionally, a single eventhouse might include a number of KQL databases:

Let’s wrap up the story concerning the Eventhouse by explaining the idea of Minimal consumption. By design, the Eventhouse is optimized to auto-suspend providers when not in use. Due to this fact, when these providers are reactivated, it would take a while for the Eventhouse to be absolutely accessible once more. Nevertheless, there are particular enterprise eventualities when this latency shouldn’t be acceptable. In these eventualities, make sure that to configure the Minimal consumption characteristic. By configuring the Minimal consumption, the service is all the time accessible, however you might be accountable for figuring out the minimal stage, which is then accessible for KQL databases contained in the Eventhouse.
KQL database
Now that you simply’ve realized concerning the Eventhouse container, let’s give attention to analyzing the core merchandise for storing real-time analytics knowledge — the KQL database.
Let’s take one step again and clarify the identify of the merchandise first. Whereas most knowledge professionals have at the least heard about SQL (which stands for Structured Question Language), I’m fairly assured that KQL is far more cryptic than its “structured” relative.
You may need rightly assumed that QL within the abbreviation stands for Question Language. However, what does this letter Ok symbolize? It’s an abbreviation for Kusto. I hear you, I hear you: what’s now Kusto?! Though the city legend says that the language was named after the well-known polymath and oceanographer Jacques Cousteau (his final identify is pronounced “Kusto”), I couldn’t discover any official affirmation from Microsoft to substantiate this story. What is unquestionably identified is that it was the internal project name for the Log Analytics Query Language.
Once we discuss historical past, let’s share some extra historical past classes. If you happen to ever labored with Azure Knowledge Explorer (ADX) up to now, you might be in luck. KQL database in Microsoft Cloth is the official successor of ADX. Much like many different Azure knowledge providers that had been rebuilt and built-in into SaaS-fied nature of Cloth, ADX offered platform for storing and querying real-time analytics knowledge for KQL databases. The engine and core capabilities of the KQL database are the identical as in Azure Knowledge Explorer — the important thing distinction is the administration habits: Azure Knowledge Explorer represents a PaaS (Platform-as-a-Service), whereas KQL database is a SaaS (Software program-as-a-Service) resolution.
Though it’s possible you’ll retailer any knowledge within the KQL database (non-structured, semi-structured, and structured), its important goal is dealing with telemetry, logs, occasions, traces, and time sequence knowledge. Beneath the hood, the engine leverages optimized storage codecs, computerized indexing and partitioning, and superior knowledge statistics for environment friendly question planning.
Let’s now study tips on how to leverage the KQL database in Microsoft Cloth to retailer and question real-time analytics knowledge. Making a database is as easy because it may very well be. The next determine illustrates the 2-step course of of making a KQL database in Cloth:

- Click on on the “+” signal subsequent to KQL databases
- Present the database identify and select its kind. Sort may be the default new database, or a shortcut database. Shortcut database is a reference to a special database that may be both one other KQL database in Actual-Time Intelligence in Microsoft Cloth, or an Azure Knowledge Explorer database
Don’t combine the idea of OneLake shortcuts with the idea of shortcut database kind in Actual-Time Intelligence! Whereas the latter merely references your complete KQL/Azure Knowledge Explorer database, OneLake shortcuts enable the usage of the information saved in Delta tables throughout different OneLake workloads, reminiscent of lakehouses and/or warehouses, and even exterior knowledge sources (ADLS Gen2, Amazon S3, Dataverse, Google Cloud Storage, to call a number of). This knowledge can then be accessed from KQL databases through the use of the external_table() perform
Let’s now take a fast tour of the important thing options of the KQL database from the user-interface perspective. The determine beneath illustrates the details of curiosity:

- Tables – shows all of the tables within the database
- Shortcuts – reveals tables created as OneLake shortcuts
- Materialized views – a materialized view represents the aggregation question over a supply desk or one other materialized view. It consists of a single summarize assertion
- Capabilities – these are Consumer-defined features saved and managed on a database stage, just like tables. These features are created through the use of the .create perform command
- Knowledge streams – all streams which can be related for the chosen KQL database
- Knowledge Exercise Tracker – reveals the exercise within the database for the chosen time interval
- Tables/Knowledge preview – permits switching between two totally different views. Tables shows the high-level overview of the database tables, whereas Knowledge preview reveals the highest 100 data of the chosen desk
Question and visualize knowledge in Actual-Time Intelligence
Now that you simply’ve realized tips on how to retailer real-time analytics knowledge in Microsoft Cloth, it’s time to get our palms soiled and supply some enterprise perception out of this knowledge. On this part, I’ll give attention to explaining varied choices for extracting helpful info from the information saved within the KQL database.
Therefore, on this part, I’ll introduce widespread KQL features for knowledge retrieval, and discover Actual-time dashboards for visualizing the information.
KQL queryset
The KQL queryset is the material merchandise used to run queries and look at and customise outcomes from varied knowledge sources. As quickly as you create a brand new KQL database, the KQL queryset merchandise shall be provisioned out of the field. This can be a default KQL queryset that’s robotically related to the KQL database below which it exists. The default KQL queryset doesn’t enable a number of connections.
On the flip facet, while you create a customized KQL queryset merchandise, you’ll be able to join it to a number of knowledge sources, as proven within the following illustration:

Let’s now introduce the constructing blocks of the KQL and study a few of the mostly used operators and features. KQL is a reasonably easy but highly effective language. To some extent, it’s similar to SQL, particularly when it comes to utilizing schema entities which can be organized in hierarchies, reminiscent of databases, tables, and columns.
The commonest kind of KQL question assertion is a tabular expression assertion. Which means that each question enter and output include tables or tabular datasets. Operators in a tabular assertion are sequenced by the “|” (pipe) image. Knowledge is flowing (is piped) from one operator to the subsequent, as displayed within the following code snippet:
MyTable
| the place StartTime between (datetime(2024-11-01) .. datetime(2024-12-01))
| the place State == "Texas"
| depend
The piping is sequential — the information is flowing from one operator to a different — which means that the question operator order is necessary and should have an effect on each the output outcomes and efficiency.
Within the above code instance, the information in MyTable is first filtered on the StartTime column, then filtered on the State column, and eventually, the question returns a desk containing a single column and single row, displaying the depend of the filtered rows.
The honest query at this level can be: what if I already know SQL? Do I have to be taught one other language only for the sake of querying real-time analytics knowledge? The reply is as traditional: it relies upon.
Fortunately, I’ve good and nice information to share right here!
The excellent news is: you CAN write SQL statements to question the information saved within the KQL database. However, the truth that you can do one thing, doesn’t imply you ought to…By utilizing SQL-only queries, you might be lacking the purpose, and limitting your self from utilizing many KQL-specific features which can be constructed to deal with real-time analytics queries in probably the most environment friendly approach
The good information is: by leveraging the clarify operator, you’ll be able to “ask” Kusto to translate your SQL assertion into an equal KQL assertion, as displayed within the following determine:

Within the following examples, we are going to question the pattern Climate dataset, which accommodates knowledge about climate storms and damages within the USA. Let’s begin easy after which introduce some extra complicated queries. Within the first instance, we are going to depend the variety of data within the Climate desk:
//Depend data
Climate
| depend
Questioning tips on how to retrieve solely a subset of data? You should use both take or restrict operator:
//Pattern knowledge
Climate
| take 10
Please take into account that the take operator won’t return the TOP n variety of data, until your knowledge is sorted within the particular order. Usually, the take operator returns any n variety of data from the desk.
Within the subsequent step, we need to lengthen this question and return not solely a subset of rows, but additionally a subset of columns:
//Pattern knowledge from a subset of columns
Climate
| take 10
| undertaking State, EventType, DamageProperty
The undertaking operator is the equal of the SELECT assertion in SQL. It specifies which columns ought to be included within the end result set.
Within the following instance, we’re making a calculated column, Period, that represents a length between EndTime and StartTime values. As well as, we need to show solely high 10 data sorted by the DamageProperty worth in descending order:
//Create calculated columns
Climate
| the place State == 'NEW YORK' and EventType == 'Winter Climate'
| high 10 by DamageProperty desc
| undertaking StartTime, EndTime, Period = EndTime - StartTime, DamageProperty
It’s the proper second to introduce the summarize operator. This operator produces a desk that aggregates the content material of the enter desk. Therefore, the next assertion will show the whole variety of data per every state, together with solely the highest 5 states:
//Use summarize operator
Climate
| summarize TotalRecords = depend() by State
| high 5 by TotalRecords
Let’s broaden on the earlier code and visualize the information straight within the end result set. I’ll add one other line of KQL code to render outcomes as a bar chart:

As it’s possible you’ll discover, the chart may be moreover custom-made from the Visible formatting pane on the right-hand facet, which supplies much more flexibility when visualizing the information saved within the KQL database.
These had been simply primary examples of utilizing KQL language to retrieve the information saved within the Eventhouse and KQL databases. I can guarantee you that KQL gained’t allow you to down in additional superior use circumstances when it’s good to manipulate and retrieve real-time analytics knowledge.
I perceive that SQL is the “Lingua franca” of many knowledge professionals. And though you’ll be able to write SQL to retrieve the information from the KQL database, I strongly encourage you to chorus from doing this. As a fast reference, I’m offering you with a “SQL to KQL cheat sheet” to offer you a head begin when transitioning from SQL to KQL.
Additionally, my pal and fellow MVP Brian Bønk revealed and maintains a improbable reference information for the KQL language here. Make certain to offer it a attempt if you’re working with KQL.
Actual-time dashboards
Whereas KQL querysets symbolize a strong approach of exploring and querying knowledge saved in Eventhouses and KQL databases, their visualization capabilities are fairly restricted. Sure, you can visualize leads to the question view, as you’ve seen in one of many earlier examples, however that is extra of a “first support” visualization that gained’t make your managers and enterprise decision-makers joyful.
Fortuitously, there’s an out-of-the-box resolution in Actual-Time Intelligence that helps superior knowledge visualization ideas and options. Actual-Time Dashboard is a Cloth merchandise that permits the creation of interactive and visually interesting business-reporting options.
Let’s first establish the core parts of the Actual-Time Dashboard. A dashboard consists of a number of tiles, optionally structured and arranged in pages, the place every tile is populated by the underlying KQL question.
As a primary step within the course of of making Actual-Time Dashboards, this setting should be enabled within the Admin portal of your Cloth tenant:

Subsequent, it’s best to create a brand new Actual-Time Dashboard merchandise within the Cloth workspace. From there, let’s connect with our Climate dataset and configure our first dashboard tile. We’ll execute one of many queries from the earlier part to retrieve the highest 10 states with the conditional depend perform. The determine beneath reveals the tile settings panel with quite a few choices to configure:

- KQL question to populate the tile
- Visible illustration of the information
- Visible formatting pane with choices to set the tile identify and outline
- Visible kind drop-down menu to pick out the specified visible kind (in our case, it’s desk visible)
Let’s now add two extra tiles to our dashboard. I’ll copy and paste two queries that we beforehand used — the primary will retrieve the highest 5 states per complete variety of data, whereas the opposite will show the harm property worth change over time for the state of New York and for occasion kind, which equals winter climate.

You can too add a tile straight from the KQL queryset to the present dashboard, as illustrated beneath:

Let’s now give attention to the varied capabilities you may have when working with Actual-Time Dashboards. Within the high ribbon, you’ll discover choices so as to add a New knowledge supply, set a brand new parameter, and add base queries. Nevertheless, what actually makes Actual-Time Dashboards highly effective is the chance to set alerts on a Actual-Time Dashboard. Relying if the situations outlined within the alert are met, you’ll be able to set off a particular motion, reminiscent of sending an electronic mail or Microsoft Groups message. An alert is created utilizing the Activator merchandise.

Visualize knowledge with Energy BI
Energy BI is a mature and broadly adopted device for constructing sturdy, scalable, and interactive enterprise reporting options. On this part, we particularly give attention to analyzing how Energy BI works in synergy with the Actual-Time Intelligence workload in Microsoft Cloth.
Making a Energy BI report based mostly on the information saved within the KQL database couldn’t be simpler. You possibly can select to create a Energy BI report straight from the KQL queryset, as displayed beneath:

Every question within the KQL queryset represents a desk within the Energy BI semantic mannequin. From right here, you’ll be able to construct visualizations and leverage all the present Energy BI options to design an efficient, visually interesting report.
Clearly, you’ll be able to nonetheless leverage the “common” Energy BI workflow, which assumes connecting from the Energy BI Desktop to a KQL database as an information supply. On this case, it’s good to open a OneLake knowledge hub and choose KQL Databases as an information supply:

The identical as for SQL-based knowledge sources, you’ll be able to select between the Import and DirectQuery storage modes in your real-time analytics knowledge. Import mode creates an area copy of the information in Energy BI’s database, whereas DirectQuery permits querying the KQL database in near-real-time.
Activator
Activator is likely one of the most revolutionary options in your complete Microsoft Cloth realm. I’ll cowl Activator intimately in a separate article. Right here, I simply need to introduce this service and briefly emphasize its important traits.
Activator is a no-code resolution for robotically taking actions when situations within the underlying knowledge are met. Activator can be utilized together with Eventstreams, Actual-Time Dashboards, and Energy BI experiences. As soon as the information hits a sure threshold, the Activator robotically triggers the desired motion — for instance, sending the e-mail or Microsoft Groups message, and even firing Energy Automate flows. I’ll cowl all these eventualities in additional depth in a separate article, the place I additionally present some sensible eventualities for implementing the Activator merchandise.
Conclusion
Actual-Time Intelligence — one thing that began as part of the “Synapse expertise” in Microsoft Cloth, is now a separate, devoted workload. That tells us so much about Microsoft’s imaginative and prescient and roadmap for Actual-Time Intelligence!
Don’t overlook: initially, Actual-Time Analytics was included below the Synapse umbrella, along with Knowledge Engineering, Knowledge Warehousing, and Knowledge Science experiences. Nevertheless, Microsoft thought that dealing with streaming knowledge deserves a devoted workload in Microsoft Cloth, which completely is smart contemplating the rising have to cope with knowledge in movement and supply perception from this knowledge as quickly as it’s captured. In that sense, Microsoft Cloth supplies an entire suite of highly effective providers, as the subsequent era of instruments for processing, analyzing, and performing on knowledge because it’s generated.
I’m fairly assured that the Actual-Time Intelligence workload will turn out to be an increasing number of vital sooner or later, contemplating the evolution of information sources and the growing tempo of information era.
Thanks for studying!

