How to use Where Clause in Kusto Query | Kusto Query Language Tutorial (KQL)

Topic: How to use Where Clause in Kusto Query Language.


How to use the Where clause in Kusto Query Language | Kusto Query Language Tutorial (KQL) Kusto Query Language is a powerful tool to explore your data and discover patterns, identify anomalies and outliers, create statistical modeling, and more. The query uses schema entities that are organized in a hierarchy similar to SQL's: databases, tables, and columns. A Kusto query is a read-only request to process data and return results. The request is stated in plain text, using a data-flow model that is easy to read, author, and automate. Kusto queries are made of one or more query statements.

 How to use the Where Clause in Kusto   
   
 //How to use Where with equal   
 TotalSale  
 | where SalePersonFName =="Aamir"  
   
 //How to get data with Where Clause By ignoring Case Senstivity  
 TotalSale  
 | where SalePersonFName =~"Aamir"  
   
 // Where clause with multiple columns  
 TotalSale  
 | where ProductName =="TV" and City =="High Point"  
   
 TotalSale  
 | where ProductName =="TV" | where City =="High Point"  
   
 //Where Clause with > or < or >= or <=  
 TotalSale  
 | where id>10  
   
 TotalSale  
 | where id<10  
   
 TotalSale  
 | where id>=10  
   
 TotalSale  
 | where id<=10  
   
   
 // Where Clause with Like operator  
 TotalSale  
 | where SalePersonFName contains "aa"  
   
 //Where clause with "%abc"  
 TotalSale  
 | where SalePersonFName startswith "Ch"  
   
 // Where clause where "abc%"  
 TotalSale  
 | where SalePersonFName endswith "ty"  
   
 //using Regex , should start with LA and ends with anything  
 TotalSale  
 | where ProductName matches regex "^La.*"  

Video Demo: How to use Where Clause in Kusto Query

No comments:

Post a Comment