Eventhouse and KQL in Microsoft Fabric, explained

What an Eventhouse and a KQL database are in Fabric, why they suit streaming and time-series data, and the KQL you need for your first queries.

Short answer: an Eventhouse is Fabric's store for streaming and time-series data: logs, sensor readings, clicks. It holds one or more KQL databases, which take in data within seconds and answer questions over billions of rows quickly. You query them with KQL (Kusto Query Language), where each line passes a table to the next with a pipe.

A lakehouse is built for data that arrives in batches and is read as tables. An Eventhouse is built for data that never stops arriving and is mostly read by time: the last hour, the last five minutes, this device since Tuesday.

Where does it sit in Fabric?

  1. 1
    Sourcesdevices, apps, Event Hubs, Kafka
  2. 2
    Eventstreamtakes events in and routes them
  3. 3
    Eventhousea KQL database stores them, indexed by time
  4. 4
    KQL queryanswers in seconds
  5. 5
    Real-time dashboardor Power BI, refreshing as data lands
From events to a live dashboard

Turn on OneLake availability for a KQL database and its tables also appear in OneLake as Delta, so Spark and Power BI can read the same data without a copy.

What does KQL look like?

Errors per device in five-minute bins over the last hour:

Telemetry
| where Timestamp > ago(1h)
| where Level == "Error"
| summarize Errors = count() by bin(Timestamp, 5m), DeviceId
| order by Timestamp asc
| render timechart
SQLKQL
SELECT a, bproject a, b
WHERE x > 5where x > 5
GROUP BY with COUNT(*)summarize count() by ...
ORDER BY torder by t
TOP 10take 10, or top 10 by x
JOINjoin kind=inner (...) on Key
KQL beside the SQL you know

Read a query top to bottom, as a pipeline: the table goes in at the top, and each line keeps, groups or reshapes what the line above passed down.

When is an Eventhouse the right choice?

  • Data arrives continuously and questions are about recent time windows.
  • You search text in logs or filter on many different fields.
  • Answers must come in seconds, while the data is still arriving.

For nightly sales tables a lakehouse or warehouse is simpler; an Eventhouse shines on what happened in the last minutes.

What goes wrong?

  • Writing SQL out of habit. KQL is case-sensitive: where Level == "error" misses Error. Use =~ to compare without case.
  • No time filter. Start every query with a where on the time column; it is how the data is laid out.
  • Keeping everything for ever. Set retention and caching policies per table, so hot data stays fast and old data costs less.

Where can you check this?

Where do you start?

Microsoft's Real-Time Intelligence tutorial builds an Eventstream into an Eventhouse in your own workspace. Streaming and KQL are a third of what DP-700 asks about.

Keep reading

More from the blog.

Every post

Next

Building this? Say hello.

A question about this post, a pattern you would build differently, or the next thing you want written out: Behnia reads every message.