Query data in the Data Product

This article outlines how to access and query your data.

The Azure Operator Insights Data Product stores enriched and processed data, which is available for querying with the Consumption URL.

Prerequisites

  • A deployed Data Product: see Create an Azure Operator Insights Data Product.
  • The Reader role for the data for this Data Product, because access to the data is controlled by role-based access control (RBAC).
    • To check your access, sign in to the Azure portal, go to the Data Product resource and open the Permissions pane. You must have the Reader role.
    • If you don't have this role, ask an owner of the resource to give you Reader permissions by following Manage permissions to the consumption URL.

Add the consumption URL in Azure Data Explorer

  1. Sign in to the Azure portal.
  2. Go to your Azure Operator Insights Data Product resource.
  3. In the Overview pane, copy the Consumption URL.
  4. Open the Azure Data Explorer web UI and select Add > Connection.
  5. Paste your Consumption URL in the connection box and select Add.

For more information, see Add a cluster connection in the Azure Data Explorer web UI.

Perform a query

Now that you have access to your data, confirm you can run a query.

  1. In the Azure Data Explorer web UI, expand the drop-down for the Data Product Consumption URL for which you added a connection.
  2. Double-click on the database you want to run your queries against. This database is set as the context in the banner above the query editor.
  3. In the query editor, run one of the following simple queries to check access to the data.
// Lists all available tables in the database.
.show tables

// Returns the schema of the named table. Replace $TableName with the name of table in the database.
$TableName
| getschema

// Take the first entry of the table. Replace $TableName with the name of table in the database.
$TableName
| take 1

With access to the data, you can run queries to gain insights or you can visualize and analyze your data. These queries are written in Kusto Query Language (KQL).

Aggregated data in the Data Product is stored in materialized views. These views can be queried like tables, or by using the materialized_view() function. Queries against materialized views are highly performant when using the materialized_view() function.