How to Create Empty table by Using Definition of Another Existing Table in Kusto Query KQL Tutorial

Topic: How to Create Empty table by Using Definition of Another Existing Table in Kusto Query KQL Tutorial


How to Create an Empty table by Using Definition of Another Existing Table in Kusto Query KQL (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.


 // if you want to create empty table depending upon definition of another table  
 // Syntax : .create table TableName based-on OtherTable [with ([docstring = Documentation] [, folder = FolderName] )]  
   
 // let's say we have a customer Table and we want to create a CustomerNew table with the same definition  
 .create table CustomerNew based-on Customer   
   
 .create table TotalSaleAsia based-on TotalSale1   
   
 // if you want to create new table with docdefinition and in new folder  
 .create table TotalSaleEurope based-on TotalSale1 with (docstring='This is used for Europe Sale',folder="EuropeSale")  
   
 // show definition of a table  
 .show table TotalSaleEurope schema as json  
   
 .show tables  


Video Demo: How to Create Empty table by Using Definition of Another Existing Table in Kusto Query KQL Tutorial

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.