Using Kusto.Explorer - Azure Data Explorer (2024)

  • Article

Kusto.Explorer is a desktop application that enables you to explore your data using the Kusto Query Language in an easy-to-use user interface. This article shows you how to use search and query modes, share your queries, and manage clusters, databases, and tables.

Search++ mode

Search++ mode enables you to search for a term using search syntax across one or more tables.

  1. In the Query dropdown on the Home tab, select Search++.

  2. Select Multiple tables.

  3. Under Choose tables, define which tables to search, then select OK.

  4. In the edit box, enter your search phrase and select Go.

    A heat-map of the table/time-slot grid shows which terms appear and where they appear.

    Using Kusto.Explorer - Azure Data Explorer (1)

  5. Select a cell in the grid and select View Details to show the relevant entries in the results pane.

    Using Kusto.Explorer - Azure Data Explorer (2)

Query mode

Kusto.Explorer includes a powerful query mode that enables you to write, edit, and run inline queries. The query mode comes with syntax highlighting and IntelliSense, so you can quickly ramp-up your knowledge of the Kusto Query Language.

This section describes how to run basic queries in Kusto.Explorer and how to add parameters to your queries.

Basic queries

If you have table Logs, you can start exploring them:

StormEvents | count 

When your cursor is on this line, it's colored gray. Press F5 to run the query.

Here are some more example queries:

// Take 10 lines from the table. Useful to get familiar with the dataStormEvents | take 10 
// Filter by EventType == 'Flood' and State == 'California' (=~ means case insensitive) // and take sample of 10 linesStormEvents | where EventType == 'Flood' and State =~ 'California'| take 10

Using Kusto.Explorer - Azure Data Explorer (3)

To learn more about the Kusto Query Language, see Kusto Query Language.

Note

Blank lines in the query expression can affect which part of the query is executed.

If no text selected, it's assumed that the query or command is separated by empty lines.If text is selected, the selected text is run.

Client-side query parameterization

Note

There are two types of query parametrization techniques in Kusto:

  • Language-integrated query parametrization is implemented server-side and is meant to be used by applications that query the service programmatically. This method is not described in this document.

  • Client-side query parametrization, described below, is a feature of the Kusto.Explorer application only. It's equivalent to using string-replace operations on the queries before sending them to be executed by the service. The syntax described below is not part of the query language itself and can't be used when sending queries to the service by means other than Kusto.Explorer.

If you use the same value in multiple queries or in multiple tabs, it's highly inconvenient to change that value in every place it's used. That's why Kusto.Explorer supports query parameters. Query parameters are shared among tabs sothat theycan be easily reused. Parameters are denoted by {} brackets. For example, {parameter1}.

You can easily define and edit existing query parameters:

Using Kusto.Explorer - Azure Data Explorer (4)

Using Kusto.Explorer - Azure Data Explorer (5)

You can have multiple sets of parameters (listed in the Parameters Set combo box).Select Add new or Delete current to manipulate the list of parameter sets.

Using Kusto.Explorer - Azure Data Explorer (6)

In Kusto.Explorer, you can share queries and results by email. You can also create deep links that open and run a query in the browser.

Kusto.Explorer provides a convenient way to share queries and query results by email.

  1. Run your query in Kusto.Explorer.

  2. In the Home tab, in the Share section, select Query and Results to Clipboard (or press Ctrl+Shift+C).

    Using Kusto.Explorer - Azure Data Explorer (7)

    Kusto.Explorer copies the following to the clipboard:

    • Your query
    • The query results (table or chart)
    • The connection details for the Kusto cluster and database
    • A link that reruns the query automatically
  3. Paste the contents of the clipboard into a new email message.

Deep-linking queries

You can create a URI that, when opened in a browser, opens Kusto.Explorer locally and runs a specific query on a specified Kusto database.

Note

For security reasons, deep-linking is disabled for management commands.

Creating a deep-link

The easiest way to create a deep-link is to author your query in Kusto.Explorer and then useExport to Clipboard to copy the query (including the deep link and results) to the clipboard. You can then share it by email.

When copied to an email, the deep link is displayed in small font. For example:

https://help.kusto.windows.net/Samples [Run the query]

The first link opens Kusto.Explorer and sets the cluster and database context appropriately.The second link (Run the query) is the deep link. If you move the link to an email message and press CTRL+K, you can see the actual URL:

https://help.kusto.windows.net/Samples?web=0&query=H4sIAAAAAAAEAAsuyS%2fKdS1LzSspVuDlqlEoLs3NTSzKrEpVSM4vzSvR0FRIqlRIyszTCC5JLCoJycxN1VEwT9EEKS1KzUtJLVIoAYolZwAlFQCB3oo%2bTAAAAA%3d%3d

Deep-links and parametrized queries

You can use parametrized queries with deep-linking.

  1. Create a query to be formed as a parametrized query (for example, KustoLogs | where Timestamp > ago({Period}) | count)

  2. Provide a parameter for every query parameter in the URI, such as:

    https://<your_cluster>.kusto.windows.net/MyDatabase? web=0&query=KustoLogs+%7c+where+Timestamp+>+ago({Period})+%7c+count&Period=1h

    Replace <your_cluster> with your Azure Data Explorer cluster name.

Limitations

The queries are limited to ~2000 characters because of browser limitations, HTTP proxies, and tools that validate links, such as Microsoft Outlook. The limitation is approximate because it's dependent on the cluster and Database name length. For more information, see https://support.microsoft.com/kb/208427.

To reduce the chances of reaching the character limit, see Getting Shorter Links.

The format of the URI is:https://<ClusterCname>.kusto.windows.net/<DatabaseName>web=0?query=<QueryToExecute>

For example:https://help.kusto.windows.net/Samples?web=0query=StormEvents+%7c+limit+10

This URI will open Kusto.Explorer, connect to the Help Kusto cluster, and run the specified query on the Samples database. If there's an instance of Kusto.Explorer already running, the running instance will open a new tab and run the query in it.

Getting shorter links

Queries can become long. To reduce the chance the query exceeds the maximum length, use the String Kusto.Data.Common.CslCommandGenerator.EncodeQueryAsBase64Url(string query) method available in Kusto Client Library. This method produces a more compact version of the query. The shorter format is also recognized by Kusto.Explorer.

https://help.kusto.windows.net/Samples?web=0&query=H4sIAAAAAAAEAAsuyS%2fKdS1LzSspVuDlqlEoLs3NTSzKrEpVSM4vzSvR0FRIqlRIyszTCC5JLCoJycxN1VEwT9EEKS1KzUtJLVIoAYolZwAlFQCB3oo%2bTAAAAA%3d%3d

The query is made more compact by applying next transformation:

 UrlEncode(Base64Encode(GZip(original query)))

Kusto.Explorer command-line arguments

Command-line arguments are used to configure the tool to perform additional functions on start-up. For example, load a script and connect to a cluster. As such, command-line arguments aren't a replacement for any Kusto.Explorer functionality.

Command-line arguments are passed as part of the URL that's used to open the application, in a similar way to query deep-linking.

Command-line argument syntax

Kusto.Explorer supports several command-line arguments in the following syntax (the order matters):

[LocalScriptFile] [QueryString]

  • LocalScriptFile is the name of a script file on your local machine, which must have the extension .kql. If such a file exists, Kusto.Explorer automatically loads this file when it starts up.
  • QueryString is a string that uses HTTP query string formatting. This method provides additional properties, as described in the table below.

For example, to start Kusto.Explorer with a script file called c:\temp\script.kqland configured to communicate with cluster help, database Samples, use thefollowing command:

Kusto.Explorer.exe c:\temp\script.kql "uri=https://help.kusto.windows.net/Samples;Fed=true&name=Samples"
ArgumentDescription
Query to execute
queryThe query to execute (gzipped, then base64-encoded; see "Getting shorter links" above). If empty, use querysrc.
querysrcThe HTTP URL of a file/blob holding the query to execute (if query is empty).
Connection to the Kusto cluster
uriThe connection string of the Kusto cluster to connect to.
nameThe display name of the connection to the Kusto cluster.
Connection group
pathThe URL of a connection group file to download (URL-encoded).
groupThe name of the connection group.
filenameThe local file holding the connection group.

Manage databases, tables, or function authorized principals

Important

Only admins can add or drop authorized principals in their own scope.

  1. To view the list of authorized principals, right-click the target entity in the Connections panel, and select Manage Database Authorized Principals. (You can also select this option from the Management Menu.)

    Using Kusto.Explorer - Azure Data Explorer (9)

  2. Select Add principal to add an authorized principal.Using Kusto.Explorer - Azure Data Explorer (10)

  3. Provide the principal details, then select Add principal.

    Using Kusto.Explorer - Azure Data Explorer (11)

  4. Confirm that you want to add the authorized principal.

    Using Kusto.Explorer - Azure Data Explorer (12)

To drop an existing authorized principal, select Drop principal and confirm the action.

Using Kusto.Explorer - Azure Data Explorer (13)

Related content

  • Kusto.Explorer keyboard shortcuts
  • Kusto.Explorer options
  • Troubleshooting Kusto.Explorer
  • Kusto.Explorer code features
  • Kusto Query Language (KQL)
Using Kusto.Explorer - Azure Data Explorer (2024)
Top Articles
R.L. Leintz Funeral Home | Leavenworth, Kansas
Belden-Larkin Funeral Home | Leavenworth, Kansas
Spasa Parish
Rentals for rent in Maastricht
159R Bus Schedule Pdf
Sallisaw Bin Store
Black Adam Showtimes Near Maya Cinemas Delano
Espn Transfer Portal Basketball
Pollen Levels Richmond
11 Best Sites Like The Chive For Funny Pictures and Memes
Things to do in Wichita Falls on weekends 12-15 September
Craigslist Pets Huntsville Alabama
Paulette Goddard | American Actress, Modern Times, Charlie Chaplin
What's the Difference Between Halal and Haram Meat & Food?
R/Skinwalker
Rugged Gentleman Barber Shop Martinsburg Wv
Jennifer Lenzini Leaving Ktiv
Justified - Streams, Episodenguide und News zur Serie
Epay. Medstarhealth.org
Olde Kegg Bar & Grill Portage Menu
Cubilabras
Half Inning In Which The Home Team Bats Crossword
Amazing Lash Bay Colony
Juego Friv Poki
Dirt Devil Ud70181 Parts Diagram
Truist Bank Open Saturday
Water Leaks in Your Car When It Rains? Common Causes & Fixes
What’s Closing at Disney World? A Complete Guide
New from Simply So Good - Cherry Apricot Slab Pie
Drys Pharmacy
Ohio State Football Wiki
Find Words Containing Specific Letters | WordFinder®
FirstLight Power to Acquire Leading Canadian Renewable Operator and Developer Hydromega Services Inc. - FirstLight
Webmail.unt.edu
2024-25 ITH Season Preview: USC Trojans
Metro By T Mobile Sign In
Restored Republic December 1 2022
12 30 Pacific Time
Jami Lafay Gofundme
Litter-Robot 3 Pinch Contact & Dfi Kit
Greenbrier Bunker Tour Coupon
Pick N Pull Near Me [Locator Map + Guide + FAQ]
Crystal Westbrooks Nipple
Ice Hockey Dboard
Über 60 Prozent Rabatt auf E-Bikes: Aldi reduziert sämtliche Pedelecs stark im Preis - nur noch für kurze Zeit
Wie blocke ich einen Bot aus Boardman/USA - sellerforum.de
Infinity Pool Showtimes Near Maya Cinemas Bakersfield
Dermpathdiagnostics Com Pay Invoice
How To Use Price Chopper Points At Quiktrip
Maria Butina Bikini
Busted Newspaper Zapata Tx
Latest Posts
Article information

Author: Kieth Sipes

Last Updated:

Views: 5759

Rating: 4.7 / 5 (67 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Kieth Sipes

Birthday: 2001-04-14

Address: Suite 492 62479 Champlin Loop, South Catrice, MS 57271

Phone: +9663362133320

Job: District Sales Analyst

Hobby: Digital arts, Dance, Ghost hunting, Worldbuilding, Kayaking, Table tennis, 3D printing

Introduction: My name is Kieth Sipes, I am a zany, rich, courageous, powerful, faithful, jolly, excited person who loves writing and wants to share my knowledge and understanding with you.