How to create the output schema from Kusto query

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

If you are using Kusto plugins that require an output schema definition as part of its syntax then it can be tricky to put together.

 

The sql_request plug in for example is one plugin that requires this.

 

Example: sql_request() : (ID:guid, Name:string, LocationLat:real, LocationLong:real)

 

The getschema operator currently is one method to get the information but it is shown in tabular format (as shown below) and still requires you to construct the syntax.

 

ShafMahmood_0-1659344510627.png

 

The good news is that the getschema operator has been updated to allow you to specify the output to be shown in an easy and reusable format.  You can do this by adding a parameter of kind=csl to the operator as shown in the example below.

 

ShafMahmood_1-1659344510631.png

 

You can simply copy and paste the output and include it in the syntax for your plugin.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.