Fathym
Menu

Read what Azi proposes

KQL Basics

Goal: Read and tweak the queries Azi writes for you. You do not need to master KQL.

Warm queries are written in KQL (Kusto Query Language). Azi writes it for you, so most of the time you just describe what you want and approve the result. This page is the small amount of KQL worth knowing so you can read a proposal, sanity-check it, and make a quick edit before you save.

THE SHAPE

Read it left to right

KQL flows top to bottom through pipes. Start with a table, then each step filters, groups, or sorts what came before. If you can read that flow, you can read most queries.

The basic structure

ProductData
| where Timestamp > ago(24h)
| summarize signups = count() by bin(Timestamp, 1h)
| order by Timestamp asc

Read it as: take ProductData, keep the last 24 hours, count rows into hourly buckets, sort oldest to newest. That is a complete warm query.

The operators you'll see most

OperatorDoesExample
wherefilter rowswhere Campaign == "spring"
summarizeaggregate (count, average, ...)summarize total = count()
bygroup the aggregatesummarize count() by Campaign
projectpick columnsproject Timestamp, Campaign
order bysortorder by Timestamp desc
takefirst N rows (quick peek)take 10

Time and aggregation

  • Time windows: ago(1h), ago(24h), ago(7d) - relative to now.
  • Bucketing: bin(Timestamp, 1h) groups rows into hourly buckets (use 1d for daily).
  • Aggregations: count(), avg(value), sum(value), min(value), max(value).

Reading one of Azi's proposals

When Azi proposes a query, scan it in five steps:

  1. Table - what data is it reading? (the first line)
  2. where - what is it filtering to? (time range, a campaign, a threshold)
  3. summarize - what is it counting or averaging?
  4. by - what is it grouping by? (per hour, per campaign)
  5. order by - how is it sorted?

If those five match what you asked for, approve it.

Quick edits you can make by hand

Want to changeEdit
The time windowago(24h) becomes ago(7d)
The threshold> 40 becomes > 100
The groupingby bin(Timestamp, 1h) becomes by Campaign
The metriccount() becomes avg(Value)

You can edit the query text directly in the Warm Query Manager, run a preview, then save. Or just ask Azi to make the change - see Working with Azi.

Next steps

On this page