How to Create Table, Drop Table and Rename Table in Kusto | Kusto Query Language (KQL)

Topic: How to Create Table, Drop Table, and Rename Table in Kusto Query Language (KQL). 

How to Create, Drop, and Rename Table in Kusto | Kusto Query Language (KQL) Kusto Query Language is a powerful tool to explore your data and discover patterns, identify anomalies and outliers, and 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 create, Drop. or Rename table in Kusto Query Language  
 // Syntax : create table TableName(Column1:DataType,ColumnTwo:DataType,....) with ( [docstring = Documentation] [, folder = FolderName] )  
   
 // Let's create Customer table with CustomerId,CustomerName,CustomerAddress,Age with docstring=" This is Customer Table"  
 // in Folder CustomerData  
   
 .create table Customer(CustomerId:int ,CustomerName:string,  
 CustomerAddress:string,Age:int)  
 with (docstring="this is Customer Table",folder ="CustomerData6")  
   
 .show tables  
   
 //Let's check the definition of table  
 .show table Customer schema as json   
   

 //Let's drop the table now  
 .drop table Customer  
 // if you want to drop multiple tables you can use below  
 .drop tables (ACustomer,CustomerAsia,CustomerEurope)  
   
 .drop tables (ACustomer,CustomerAsia,CustomerEurope)  
   
 // Show list of tables  
 .show tables  
  
 
 // How to Rename Table in Kusto  
 // Syntax : .rename table OldName to NewName  
   
 // Let's say we want to rename CustomerNew table to Customer  
 .rename table CustomerNew to Customer<div><br />&nbsp;  

Video Demo: How to Create Table, Drop Table, and Rename Table in Kusto | Kusto Query Language (KQL)

1 comment:

  1. Hello. Would you like to try authentic Italian durum wheat pasta? Barilla Penne Lisce is the best and highest quality of all pastas. It is made from high quality Italian wheat, which ensures an excellent taste. It can also be combined with a variety of sauces.

    ReplyDelete