hands-on lab

Exploring Query Statement and Function Types in Kusto Query Language (KQL)

Difficulty: Intermediate
Duration: Up to 1 hour
Students: 116
Rating: 4.6/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Kusto Query Language (KQL) is a powerful pipeline-driven, read-only query language that enables the queries against the azure logs to be easier and straightforward. Query statements are a core functionality that provides rich log search capabilities to understand the captured raw data. The statements in KQL support many constructs that help you create maintainable and reuseable queries.

In this hands-on lab, you will learn how to write let statements in the KQL editor and create stored functions. You will then use the stored function to build the final query.

Learning Objectives

Upon completion of this intermediate-level lab, you will be able to:

  • Understand KQL query let statements
  • Understand expressions supported by let statements
  • Understand different functions types supported by KQL
  • Create stored functions and use them as a reference

Intended Audience

  • Candidates for Azure Administrator Exam
  • Cloud Architects
  • Data Engineers
  • Software Engineers

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • Azure Log Analytics
  • Understanding SQL or similar query commands

The following lab can be used to fulfill the prerequisite:

Updates

May 27th, 2022 - Updated the instructions and screenshots to reflect the latest UI

Environment before

Environment after

Covered topics

Lab steps

Logging in to the Microsoft Azure Portal
Creating Query using Let Statement in KQL
Creating Reusable Log Analytics Query Function