Critical business operations may not be able to wait for the next nightly batch. The Kusto Query Language (KQL) enables these scenarios, allowing us to query and act on enormous volumes of timestamped, append-only events in near-real time as part of Fabric Real-Time Intelligence.
Today, we will explore a supply chain, from raw stream to dashboard to alert.
Fabric Real-Time Intelligence is a solution for building (near) real-time data pipelines, dashboards, and alerts using Kusto Query Language (KQL) and other integrated components.
Every real-time system does the same four things in the same order:
We will walk that arc end to end, covering the stages as well as the interactions between them.
A database optimized for data that arrives constantly and (usually) does not receive updates.
Eventhouse
Lakehouse
Most architectures use both: the Eventhouse is where data lands hot, the lakehouse is where it settles.
The Kusto Query Language (KQL) is designed for querying large datasets efficiently. The syntax is similar to Splunk's query language versus a SQL variant. Even so, the concepts of KQL are quite similar to T-SQL in spite of the syntax differences.
One key difference is that KQL is case-sensitive, whereas T-SQL will depend on the collation.
A query is a table, followed by a chain of operators that each take a table and return a table.
Read it top to bottom. There is no need to jump to the end of the query to find out what it selects.
KQL was born analyzing telemetry, and that heritage shows in its time series and text-search operators.
But anything with a timestamp and a lot of rows is a candidate, including IoT readings, financial ticks, clickstream, application traces, and supply chain events.
Synthetic but statistically realistic data, courtesy of Spindle. It includes 10 related tables with enforced foreign key integrity.
warehouse, supplier, material: the reference datapurchase_order, purchase_order_line: what was orderedshipment: how it travels, and with which carriershipment_event: the live stream
code/02 - KQL Basics.kql
The Real-Time hub is a tenant-wide catalog of every streaming source available to you, including Event Hubs, IoT Hub, Kafka topics, database change feeds, Fabric events, and more.
The goal is to discover and subscribe rather than build bespoke ingestion for each source.
Low-code ingestion: connect a source, optionally transform in flight, land it in a destination.
Sources
Destinations
Spindle generates statistically realistic supply chain events. A small Python bridge relays them to an Eventstream custom endpoint, which is Event Hub compatible.
And to load the seed history the demos query against:
code/03 - Streaming and Real-Time Patterns.kql
event_timestamp is when the thing happened. ingestion_time() is when the Eventhouse received it.
The gap between them is your end-to-end latency. Measure it and you have a Service Level Objective (SLO) you can alert on.
Where summarize leaves holes, make-series fills them.
That matters more than it sounds: every series function below needs evenly spaced points. A missing hour is not a gap in the chart; it silently shifts every subsequent value.
series_stats_dynamic: min, max, mean, varianceseries_outliers: per-point outlier scoresseries_decompose: seasonal, trend, residualseries_decompose_anomalies: flags the unexplainedseries_periods_detect: finds hidden rhythmsseries_decompose_forecast: extends forwardseries_fir: moving averagesPre-aggregate on ingestion so dashboard tiles stay cheap as volume grows.
Query it exactly like a table.
Transform on ingest rather than on read. For example, we can route only the exceptions into their own narrow table, so the alerting query never scans the firehose.
code/04 - Time Series.kql
Anomalies on demand:
Microsoft Fabric offers "Real-Time Dashboard," a set of tiles built on KQL queries. With no semantic model in between, the data is up to date without needing to think about refresh schedules.
Because this is not a Power BI report, there are limits to the number of available visuals.
Pick an interval that respects the ingestion batching window.
Live refresh enables immediate updates to the dashboard as new data arrives, and caps the maximum refresh rate to avoid overwhelming the backend.
For visuals that do not support live refresh, you can still configure a scheduled refresh interval of, e.g., every 5 minutes.
_startTime and _endTimeshipment | distinct carrier_name
Real-Time Dashboards
Power BI
code/05 - Dashboards and Alerts.kql
Fabric Activator provides no-code event detection capabilities against streaming or Eventhouse data.
Because it triggers on events, actions are taken immediately when conditions are met rather than running on a timer.
This also allows you to respond to issues in near-real time, rather than discovering them after the fact.
The first is the obvious one. The second is the one people forget.
A rate-based alert cannot fire when there is no data.
No events means no rows, which means no rate is computed, which means the threshold never trips. A dead pipeline looks exactly like a healthy one.
Alert on silence, not just on noise.
Fire the alert to see a tenfold burst for 60 seconds, starting 30 seconds in:
An Eventhouse is a first-class Power BI source. The KQL database exposes a connector, and every query you have written is reusable as a source.
Use a Real-Time Dashboard when someone is watching the screen because something might go wrong.
Use Power BI when someone needs to understand what happened, alongside data that does not live in the Eventhouse.
Use Activator when nobody should have to watch at all.
== over =~, has over containsmaterialize() anything you reference more than oncetake 10 while exploring, and drop it once the shape is rightset notruncation; to disableset truncationmaxsize / set truncationmaxrecords to adjustThese limits exist to stop you from accidentally retrieving enormous amounts of data and paying the price in time and money.
Reach for Real-Time Intelligence when freshness is the requirement: data arrives continuously, questions are exploratory, and the answer stops being useful within minutes.
Reach for lakehouse analytics when correctness and breadth matter more: curated history, joins across domains, results that must reconcile.
In many cases, the right answer for most organizations is "both," with the Eventhouse in front.
code/06 - Query Recommendations.kql
KQL remains the best language available for timestamped, append-only data at volume. Fabric Real-Time Intelligence brings the whole story together in one place: ingest, query, visualize, alert.
To learn more, go here:
https://csmore.info/on/rti
And for help, contact me:
feasel@catallaxyservices.com | @feaselkl
Catallaxy Services consulting:
https://CSmore.info/on/contact