Low-Code Real Time Data in Microsoft Fabric w. Eventstream & KQL Database

Introduction

“I want the data in real time” – is a sentence heard once too many by Data Analysts.

In reality, real time has many different definitions depending on the stakeholder. To some it means that data is updated once an hour. To some it just means updated data ‘when I get in in the morning’. And then there are the few who truly means real time data: Data that is coming in live from the source.

In Microsoft Fabric and Power BI, true real time data has never been super easy. Streaming Dataflows, Streaming Semantic Models, Push Datasets… They’ve all been there for a while, but they’re rarely used.

Microsoft Fabric now introduces the Real Time Analytics experience, with low-code tools such as Eventstreams at the center, making it easier than ever to create real-time analytics in Fabric and Power BI.

This article takes a Data Analysts approach to working with Eventstreams, to show how one can go from Real Time Data Source, to Real Time Dataset that we can use in Power BI and Data Activator.


Step 1: Setup a KQL Database

Your first step to realtime success is setting up a KQL Database to hold your real time data. You can do this by entering a workspace from any Fabric Experience, and creating a new artifact:

This will be the container from which Power BI will be able to source real time data.

In the KQL Database you’ll have the option to ingest data from multiple sources:

In our case, we will create an Eventstream.


Step 2: Setup the Eventstream and connect to KQL Database

Next, create the Eventstream from the Data Source page in your KQL database, or create an Eventstream Artifact from scratch in your workspace:

You can add multiple sources of input and multiple sources of output to the evenstream. If you have access to an Event or IoT hub, you can connect to those. This article will not describe how to setup the initial data sources, as that is slightly outside the scope of an analyst.

In this case, I am connecting to the Bicycle Sample included in Fabric:

And as destination, I will select my KQL database:


Step 3: Transforming real time data with the event processor

Now, the real magic here happens inside the Event Processor, which allows me to preview and transform the input data being sent to the source:

The interface looks somewhat similar to Visual Queries in dataflows, or pipelines in Data Factory, and you interact with the interface in much the same way. Use the GUI to transform data, and the preview to see your changes live:

The available transformations are seen above. In my example, I’m using an Aggregate operation to create two new fields, for counting the Max & Average of Empty Docks:

In addition, I used Manage Fields to rename a column and change a data type:

As well as tested out the Filter and Union operators just for good measure, giving me the final flow seen below:


Step 3.1: Creating multiple outputs from one Evenstream

In addition to the flow above, I also created a more simple Aggregated Output to another table in the KQL Database, in which I used the Group By operation to create an aggregated table as seen below:

And also I created an output to a Data Activator reflex. For direct output to Data Activator, you do however not have the possibility of doing event processing:


Step 4: Creating reports on your Real Time data

The final Eventstream now looks like this:

And all there is left to do, is to return to the KQL Database to see the data flow in, and start to create reports on Real Time Data!

You can either right click on a Table inside the Power BI Service to get started with report building:

Or if you wish, you can create a report from Power BI Desktop, and find your KQL Database in the OneLake data hub:

Creating a report in either of scenarios will result in a new semantic model being published along with the report. The data connection to the KQL DB will be DirectQuery:

Hence, you may consider taking advantage of Automatic Page Refresh if you want to make the most of your new report with LIVE DATA:

One response to “Low-Code Real Time Data in Microsoft Fabric w. Eventstream & KQL Database”

  1. […] This article will outline how to use Data Activator with data in your Eventstreams and KQL Databases, and in combination with Power Automate, how to drive instant notifications with almost any platform. If you need help setting up Eventstreams and KQL databases, check out my previous blog post: https://downhill-data.com/?p=176 […]

    Like

Leave a comment

Blog at WordPress.com.