• azurecoder

Kusto Lightning Fact 2: render

One of the great things about Kusto and KQL is that the key language bindings support charts as well as tabular output. Aside from this being very cool it means that you can do everything within the Kusto environment.

Let's remind ourselves of the query from the last Kusto lightning fact.

project Region, Total_Revenue, Order_Date
| summarize Earnings = round(sum(Total_Revenue) / 1000000000, 1) by Region, Year = getyear(Order_Date)
| order by Region, Year asc;

In order to build a bar chart we simply need to render the above query.

| render columnchart with(ycolumns=Earnings, xcolumn=Year, series=Region);

So we pipe the original query to our render function setting the Y column as Earnings, the X column as Year and building a series for the various Regions we're reporting on.

As you can see the below we get nice coloured columns appear the series in our environment as well as tooltips and a legend on the right. Aside from 2017, which may be incomplete, the data doesn't vary that much.

Have fun rendering charts!

61 views0 comments

Recent Posts

See All

Just one more column, what could go wrong?

Sometimes, when you go scanning through the documentation for Spark, you come across notes about certain functions. These tend to offer little hints and tips about using the function, or to give warni

Why leave bad data to chance?

Something that we often see as Spark jobs are moved into production is that handling of bad data is either ignored, or a lot of effort goes into validating the data and, specifically for this post, th