Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
This tutorial is part of a series. For the previous section, see: Real-Time Intelligence tutorial part 3: Transform data in a KQL database.
In this part of the tutorial, you learn how to query your streaming data using KQL. You write a KQL query and visualize the data in a time chart.
The name of the table you created from the update policy in a previous step is TransformedData. Use this (case-sensitive) name as the data source for your query.
Tip
If you have a sufficient subscription, you can use the Copilot feature to help you write queries. Copilot provides queries based on data in your table and natural language prompts. For more information, see Copilot for Real-Time Intelligence (preview)
Enter the following query. Then press Shift + Enter to run the query.
TransformedData
| where BikepointID > 100 and Neighbourhood == "Chelsea"
| project Timestamp, No_Bikes
| render timechart
This query creates a time chart that shows the number of bikes in the Chelsea neighborhood as a time chart.
In this step, you create a materialized view, which returns an up-to-date result of the aggregation query (always fresh). Querying a materialized view is more performant than running the aggregation directly over the source table.
Copy/paste and run the following command to create a materialized view that shows the most recent number of bikes at each bike station:
.create-or-alter materialized-view with (folder="Gold") AggregatedData on table TransformedData
{
TransformedData
| summarize arg_max(Timestamp,No_Bikes) by BikepointID
}
Copy/paste and run the following query to see the data in the materialized view visualized as a column chart:
AggregatedData
| sort by BikepointID
| render columnchart with (ycolumns=No_Bikes,xcolumn=BikepointID)
You will use this query in the next step to create a Real-Time dashboard.
Important
If you have missed any of the steps used to create the tables, update policy, function, or materialized views, use this script to create all required resources: Tutorial commands script.
For more information about tasks performed in this tutorial, see:
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Module
Get started with Real-Time Intelligence in Microsoft Fabric - Training
Analysis of real-time data streams is a critical capability for any modern data analytics solution. You can use the Real-Time Intelligence capabilities of Microsoft Fabric to ingest, query, and process streams of data.
Certification
Microsoft Certified: Fabric Data Engineer Associate - Certifications
As a Fabric Data Engineer, you should have subject matter expertise with data loading patterns, data architectures, and orchestration processes.
Documentation
Real-Time Intelligence tutorial part 6 - Create a Power BI report - Microsoft Fabric
Learn how to create a Power BI report from your KQL queryset Real-Time Intelligence.
Real-Time Intelligence tutorial part 3- Transform data in a KQL Database - Microsoft Fabric
Learn how to use an update policy to transform data in a KQL Database in Real-Time Intelligence.
Real-Time Intelligence tutorial part 5 - Create a Real-Time Dashboard - Microsoft Fabric
Learn how to create a Real-Time Dashboard in Real-Time Intelligence.