KQL best practices
In this section, we will discuss some of the best practices that you should take into consideration when developing your KQL queries.
Version controlling your queries
The first recommendation is to version control all your queries, any scripts, and so on, that you may be using. Version control is a way to track changes in your source code – in our case, KQL queries. Not only does version control help us keep track of all source code changes that have been made to your code, but it also helps us share code with colleagues and friends. All the code examples that accompany this book are version controlled using a popular version control tool called Git and are hosted on github.com.
At one point in their careers, I am pretty sure all developers have looked at their old code and felt like they had no idea what the code does. Since version control keeps track of all changes, we can easily search the change history to understand why certain changes have...