• 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!


187 views0 comments

Recent Posts

See All

Dropping a SQL table in your Synapse Spark notebooks

One of the nice things with Spark Pools in Azure Synapse Analytics is how easy it is to write a data frame into a dedicated SQL Pool. curated_df.write.mode("overwrite").synapsesql("curation.dbo.feed_i

What makes a data engineer?

Note: this post is mainly about Azure but it can apply to any cloud. You get to a stage when you hear enough definitions of what people think a job is to take you to the point of nervous exhaustion. T