kql-cheat-sheet

KQL Cheat Sheet for Real Time Intelligence

A comprehensive, community-driven reference for Kusto Query Language (KQL) specifically tailored for Real Time Intelligence scenarios. This repository provides practical examples, best practices, and quick references for working with telemetry data, application insights, and real-time analytics.

Originally compiled by: Akshay Dixit (kustonaut)
Source: http://aka.ms/kustonautKQLcheatsheet
Enhanced for: Real Time Intelligence scenarios and community collaboration

🎯 What is KQL and Real Time Intelligence?

πŸ“Š Kusto Query Language (KQL)

KQL is a powerful query language designed for analyzing large datasets in real-time. Originally developed for Azure Data Explorer, KQL excels at:

πŸš€ Microsoft Fabric Real Time Intelligence

Real Time Intelligence (RTI) is Microsoft’s comprehensive solution for real-time analytics, providing:

🏒 Eventhouse in Real Time Intelligence

Eventhouse is the cornerstone data store in RTI, offering:

Key Eventhouse Benefits:

🎯 Why This Combination Matters

The synergy of KQL + RTI + Eventhouse creates a powerful ecosystem for:

πŸš€ Quick Start

πŸ“‹ What’s Included

🎨 Visual Learning Features

Core Reference

Real Time Intelligence Specific

Practical Examples

🎯 Target Audience

πŸ—οΈ Project Structure

β”œβ”€β”€ KQL-Cheat-Sheet.md          # Main cheat sheet
β”œβ”€β”€ examples/                   # Practical examples
β”‚   β”œβ”€β”€ performance/            # Performance monitoring queries
β”‚   β”œβ”€β”€ monitoring/             # Health and alerting queries
β”‚   β”œβ”€β”€ business/               # Business intelligence queries
β”‚   └── security/               # Security and audit queries
β”œβ”€β”€ docs/                       # GitHub Pages website
β”‚   β”œβ”€β”€ index.md                # Website homepage
β”‚   └── _config.yml             # Jekyll configuration
└── .github/
    β”œβ”€β”€ workflows/pages.yml     # GitHub Pages deployment
    └── copilot-instructions.md # Copilot customization

πŸ“š Usage Examples

Quick Reference

// Basic pattern: Filter β†’ Transform β†’ Aggregate
TableName
| where timestamp > ago(1h)
| summarize count() by EventLevel
| sort by count_ desc

Performance Analysis

// Request performance analysis
requests
| where timestamp > ago(6h)
| summarize 
    Requests = count(),
    AvgDuration = avg(duration),
    P95Duration = percentile(duration, 95)
by bin(timestamp, 15m)
| render timechart

Error Analysis

// Exception trending
exceptions
| where timestamp > ago(24h)
| summarize Count = count() by bin(timestamp, 1h), type
| render timechart

🀝 Contributing

We welcome contributions from the community! Here’s how you can help:

Adding Examples

  1. Fork the repository
  2. Add your query examples to the appropriate category
  3. Include comments explaining the query purpose
  4. Submit a pull request

Improving Documentation

Suggesting Improvements

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

⭐ Show Your Support

If this cheat sheet helps you, please:

πŸ“ž Support


Made with ❀️ for the Real Time Intelligence community

Keep this cheat sheet handy and happy querying! πŸ”