Kusto (KQL) extension for Azure Data Studio (Preview)
The Kusto (KQL) extension for Azure Data Studio enables you to connect and query to Azure Data Explorer clusters.
Users can write and run KQL queries and author notebooks with the Kusto kernel complete with IntelliSense.
By enabling the native Kusto (KQL) experience in Azure Data Studio, data engineers, data scientists, and data analysts can quickly observe trends and anomalies against massive amounts of data stored in Azure Data Explorer.
This extension is currently in preview.
Prerequisites
If you don't have an Azure subscription, create a free Azure account before you begin.
The following prerequisites are also required:
Install the Kusto (KQL) extension
To install the Kusto (KQL) extension in Azure Data Studio, follow the steps below.
Open the extensions manager in Azure Data Studio. You can either select the extensions icon or select Extensions in the View menu.
Type in Kusto in the search bar.
Select the Kusto (KQL) extension and view its details.
Select Install.
How to connect to an Azure Data Explorer cluster
Find your Azure Data Explorer cluster
Find your Azure Data Explorer cluster in the Azure portal, then find the URI for the cluster.
However, you can get started immediately using the help.kusto.windows.net cluster.
For this article, we're using data from the help.kusto.windows.net cluster for samples.
Connection details
To set up an Azure Data Explorer cluster to connect to, follow the steps below.
Select New connection from the Connections pane.
Fill in the Connection Details information.
- For Connection type, select Kusto.
- For Cluster, enter in your Azure Data Explorer cluster address (for example,
https://mydataexplorercluster.kusto.windows.net
). - For Authentication Type, use the default.
- For Account, use your account information.
- For Database, use Default. If your account does not have access to the Default database, you can use any database that you have access to.
- For Server Group, use Default.
- You can use this field to organize your servers in a specific group.
- For Name (optional), leave blank.
- You can use this field to give your server an alias.
How to query an Azure Data Explorer database in Azure Data Studio
Now that you have set up a connection to your Azure Data Explorer cluster, you can query your database(s) using Kusto (KQL).
To create a new query tab, you can either select File > New Query, use Ctrl + N, or right-click the database and select New Query.
Once you have your new query tab open, then enter your Kusto query.
Here are some samples of KQL queries:
StormEvents
| limit 1000
StormEvents
| where EventType == "Waterspout"
For more information about writing KQL queries, visit Write queries for Azure Data Explorer
View extension settings
To change the settings for the Kusto extension, follow the steps below.
Open the extension manager in Azure Data Studio. You can either select the extensions icon or select Extensions in the View menu.
Find the Kusto (KQL) extension.
Select the Manage icon.
Select the Extension Settings icon.
The extensions settings look like this:
SandDance visualization
The SandDance extension with the Kusto (KQL) extension in Azure Data Studio bring rich interactive visualization together. From the KQL query result set, select the Visualizer button to launch SandDance.
Known issues
Details | Workaround |
---|---|
In Kusto notebook, Changing a database connection on a saved alias connection is stuck after an error in code cell execution | Close and reopen the Notebook, then connect to the right cluster with the database |
In Kusto Notebook, changing a database connection on a non-saved alias connection doesn't work | Create a new connection from Connection Viewlet and save it with an alias. Then create a new notebook and connect to the newly saved connection) |
In Kusto Notebook, the database dropdown isn't populated when creating a new ADX connection | Create a new connection from Connection Viewlet and save it with an alias. Then create a new notebook and connect to the newly saved connection) |
You can file a feature request to provide feedback to the product team.
You can file a bug to provide feedback to the product team.
Next steps
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for