Case Function in Kusto Query | Azure Data Explorer | Kusto Query Language Tutorial (KQL)

Topic: Case Function in Kusto Query Language.


In this article we are going to learn about Case Statement in Kusto Query Language, this is pretty much the same way what you have learned in other languages so not a big difference here but we are going to experiment and see how exactly it looks in Kusto Query Language.

 //Case ()  
 //Evaluates a list of predicates and returns the first result expression whose predicate is satisfied.  
 //If neither of the predicates return true, the result of the last expression (the else) is returned.  
   
 //Let's create a table Customer  
 //.drop table Customer  
 .create table Customer (CustomerId: long, FName: string,LName:string, Salary: int)   
  .ingest inline into table Customer <|  
 1,Aamir,Shahzad,2000  
 2,Raza,ALI,4000  
 3,Lisa,Rivers,50000  
 4,steve,Ladson,1000  
 5,Robert,Jr,500  
 6,aamir,ali,  
   
   
 Customer  
 | extend   
 SalaryType=case (Salary<=2000 or isnull(Salary) , 'VeryLow'  
 ,Salary>2000 and Salary<=4000, 'Medium'  
 ,'Good')  
   

Video Demo: Case Function in Kusto Query | Azure Data Explorer | Kusto Query Language Tutorial (KQL)

2 comments:

  1. No matter your skill level, pixel speedrun, the online running game, welcomes you to join the fun and compete at your own pace.

    ReplyDelete
  2. HARNESS THE EFFECIENCY OF CRYPTO RECOVERY-SYNACK TECH
    I came across SYNACK TECH which is an exceptional and highly reputable private licensed investigation firm based in the states that i had the privilege of engaging with after my company suffered a loss of $950,000 worth of btc due to a mistaken transfer to an unknown account by our financial accountant. Despite our desperate attempts to recover the funds through traditional channels and various recovery firms, we were met with disappointment and further financial losses. However, our fortunes changed when we discovered SYNACK TECH. Upon contacting them, their team of skilled professionals' swiftly and effectively managed to recover $830,300 of our lost funds, bringing immense relief and peace to our company. Their dedication and expertise were truly impressive, and their ability to successfully recover such a significant portion of the lost funds is a testament to their exceptional capabilities in the realm of cryptocurrency recovery. I wholeheartedly recommend SYNACK TECH for any hacking services and crypto recovery needs as their outstanding performance has not only mitigated the financial impact on our company but also restored faith in the possibility of recovering lost assets in the complex world of cryptocurrency. This experience has highlighted the invaluable importance of seeking out a reputable and skilled professionals like SYNACK TECH when faced with similar challenges, as their proficiency and commitment to their clients' success are truly unique and unmatched. With their extensive knowledge and unwavering dedication, SYNACK TECH has proven to be an invaluable asset in navigating the complexities of cryptocurrency recovery, providing hope and a lifeline for those who have experienced significant financial losses in the digital asset space. Their swift and effective actions have not only mitigated the devastating impact of our financial loss but have also restored our confidence in the possibility of recovering lost assets in the intricate world of cryptocurrency. I cannot overstate the level of gratitude and admiration we hold for SYNACK TECH, as they have not only demonstrated unmatched expertise but have also exhibited a deep commitment to their clients’ success. If you in a similar predicament reach out to SYNACKHACK {@} TECH {-} CENTER {DOT} COM

    ReplyDelete