Range Operator in Kusto Query Language | Generate Number Sequence or Date Range in Kusto Query Language

Topic: Range Operator in Kusto Query Language (KQL).


In this article, we are going to learn about the range operator, range operator is used to generate a single-column table of values. Kusto Query Language is a powerful tool for exploring your data and discovering patterns, identifying anomalies and outliers, creating statistical modeling, etcfor exploring your data and discovering patterns, identifying anomalies and outliers, creating statistical modeling, single-column The query uses schema entities that are organized in a hierarchy similar to SQL's: databases, tables, and columns.


 //range operator : Generates a single-column table of values.  
 // syntax : range columnName from start to stop step step  
   
 //create sequence no  
 range Steps from 1 to 8 step 1  
   
 //create range of dates  
 range LastWeek from ago(7d) to now() step 1d  
   
   
 //create range of even numbers  
 range Steps from 2 to 100 step 2  
   
   
 //create range of odd numbers  
 range Steps from 1 to 100 step 2  
   
 //Let's create a table Customer  
 //.drop table Customer  
 .create table Customer (CustomerId: long, Name: string)   
  .ingest inline into table Customer <|  
 1,Aamir  
 2,Raza  
 3,Lisa  
 4,steve  
 5,Robert  
   
 //you can use range output in many ways // try to get all records with odd and even CustomerId  
 range CustomerId from 1 to 5 step 2  
 | join kind=inner (Customer ) on $left.CustomerId==$right.CustomerId  
 | project CustomerId,Name  
   
   
   

Video Demo: Range Operator in Kusto Query Language | Generate Number Sequence or Date Range in Kusto Query Language

2 comments:

  1. I appreciate the enlightening details. It benefits me in some way. Would you kindly elaborate on this for me? I found this site to be helpful after reading the post Generate Number Sequence or Date Range in Kusto Query Language. For my task, I looked for the top online nursing dissertation topics services. Your blog is excellent. There was a many excellent information there, in my opinion. I appreciate you sharing. I'm hopeful you'll continue to post breaking news.

    ReplyDelete
  2. Do you need funds to finance you subutex doctors near me
    project? We Offers guaranteed loan services of any amount and to any part of the world fog.

    ReplyDelete