- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
- Data
Filter and Search Order Data with Kusto Query Language (KQL)
Imagine you are a data analyst at Globomantics, an online retailer running a seasonal promotion. Leadership needs to know which product categories and regions drove revenue during the campaign. You will use Kusto Query Language (KQL) in Azure Data Explorer to filter the order data, search for matching text and patterns, and apply conditional logic to isolate the cohort of orders that matter.
Lab Info
Table of Contents
-
Challenge
Connect to the Globomantics order data in Azure Data Explorer
- Locate the Azure Data Explorer cluster and connect to it in the web UI.
- Select the
GlobomanticsDBdatabase and confirm the order data is reachable. - Inspect the record count, column schema, and a sample of rows.
-
Challenge
Narrow the order dataset with where filters
- Filter orders with comparison and logical operators, including a date and time range.
- Select and exclude groups of values with
inand!in. - Identify orders with missing data using
isempty,isnotempty, andisnull.
-
Challenge
Search order text and patterns with string operators
- Match substrings, prefixes, and suffixes with
contains,startswith, andendswith. - Match whole terms and prefixes with
hasandhasprefix. - Choose between
containsandhasbased on accuracy and performance.
- Match substrings, prefixes, and suffixes with
-
Challenge
Create conditional fields with iif and case
- Add a calculated order value column with
extend. - Flag orders with a two-way condition using
iif. - Band orders by value with a multi-way condition using
case.
- Add a calculated order value column with
-
Challenge
Isolate the promotion cohort and identify revenue drivers
- Combine conditional fields with
wherefilters to isolate promotional revenue. - Exclude cancelled and returned orders from the cohort.
- Summarize revenue by product category and region to find the leading drivers.
- Combine conditional fields with
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.