Press "Enter" to skip to content

Parsing JSON and todynamic in KQL

Robert Cain reviews a rose by any other name:

In order to compact data, JSON is often used to store information within columns in databases. JSON is also useful when you want to store data, but the exact data is different on a row by row basis. Using JSON prevents the need to have a lot of extra columns that will be blank for many of the rows.

It becomes important then that a query language provides a simple method for unpacking that JSON data into useful columns. The Kusto Query Language provides that ability through the use of the parse_json scalar function. In this post we’ll look at examples of how to use it to expand data stored in JSON format.

Read on to see how this relates to the todynamic function in KQL, as well as examples of how to use parse_json.