Kusto Query String Functions with Not | Kusto Query Language Tutorial (KQL)

Topic: Kusto Query String Functions with Not In Kusto Query Language


Not operator returns the reversed logical value of its bool argument, 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.


 //! - Not Operator - When you want to go opposite  
 //Let's create a table Customer  
 //.drop table Customer  
 .create table Customer (CustomerId: long, FName: string,LName:string )   
  .ingest inline into table Customer <|  
 1,Aamir,Shahzad  
 2,Raza,Ali  
 3,Lisa,River  
 4,steve,Ladson  
 5,Robert,Jr  
 ,aamir,ali  
 // Get everything but where FName does not contain aamir  
 Customer  
 | where FName !contains "aamir"  
 // !contain_cs - Case senstive  
 Customer  
 | where FName !contains_cs "Aamir"  
 // Get all but not in the provided list - Case senstive  
 Customer  
 | where FName !in ("aamir")  
 // Get all but not in the provided list - Case Insenstive  
 Customer  
 | where FName !in~("aamir")  
 // startswith_cs and startswith with !  
 Customer  
 | where FName !startswith "aa"  
 Customer  
 | where FName !startswith_cs "Aa"  
 //endswith and endswith_cs with !  
 Customer  
 | where FName !endswith "IR"  
 Customer  
 | where FName !endswith_cs "ir"  
 //usefull link  
 //https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators  

Video Demo: Kusto Query String Functions with Not | Kusto Query Language Tutorial (KQL)

1 comment:

  1. Slope 3 takes you on a high-speed snowboarding adventure across thrilling terrains and death-defying jumps.

    ReplyDelete