Creating a Query
Creating your first Query
If you are in doubt were to find the Query editor or how to select a Database, please see Queries.
Familiarize yourself with KQL:
The Query Editor uses KQL (Kusto Query Language) to query data. If you're new to KQL, refer to the Learning Kusto Query Language (KQL)
Select a database in the connection tree to the left and write queries Build Your Query:
Use the query editor interface to type your KQL commands.
This Query will show the name all Asset Hierarchies that has been deployed to a device, and sort them alphabetically by the name of the Asset Hierarchy:
AssetHierarchy | distinct HierarchyName | order by HierarchyName asc
Preview your Query:
Click Run to execute the query and preview the results in the Results panel.

Build another Query
The query below tries to select 100 random measurements from the Database from the last 10 days.
Measurements
| where StartTimestamp > ago(10d)
| take 100
This query will only return data, if a deployment to an Edge device has been done, and the Edge device has collected data from one or more data connections within the last 10 days.

Query specific Tag measurements
From the query you ran before, try and copy the HierarchicalName from one of the Measurements in the Table, and then insert the name in the query below, where it says <insert hierarchical name here>.
Measurements
| where StartTimestamp between (ago(10d) .. now())
| where HierarchicalName has "<insert hierarchical name here>"
| order by StartTimestamp asc
| limit 5000
The Query selects datapoints from the last 10 days from the chosen Tag (HierarchicalName). It orders the Measurements by its StartTimestamp in ascending order, then takes the first 5000 data points.

For more Queries please see:
Basic Queries Basic operators
Intermediate Queries Join, Summarize and make-series operators
Advanced Queries Trendline and Forecasting
For more details on KQL, please see Kusto Query Language in Microsoft's documentation.
Last updated
Was this helpful?