Search
  • Reviewed by Maslows

Find all queries to Azure AS from a Power BI report or dataset from Kasper On BI

I recently found out the SSAS team added new trace information to Azure Log analytics. The new information allows you to find out the report and dataset in Power BI that generate each query.

To show you how this works. I captured the queries in AAS using Azure Log analytics as I described here.

I then make sure I add the column ” ApplicationContext_s” using the query below. This will give me the context the query was running under.

AzureDiagnostics | where OperationName == "QueryBegin" | project TimeGenerated, TextData_s, DatabaseName_s, ApplicationContext_s | where TimeGenerated > ago(2h)

In this case it is the generated by the Power BI service and the column contains the DatasetId and ReportId as we know it in Power BI.

This is very useful if we want to figure out who is generating a particular load on the service.

But there is also another use of this, we can use the DatasetId or ReportId as filter to the query. This allows us to only see the data for the dataset or report we want.

AzureDiagnostics | where OperationName == "QueryBegin" | project TimeGenerated, TextData_s, DatabaseName_s, ApplicationContext_s | where TimeGenerated > ago(2h) | where ApplicationContext_s contains "b9d53eb4-01e7-4eb5-989b-a416769b9001"

A very useful addition to the logs that might come in handy when doing some debugging.

The post Find all queries to Azure AS from a Power BI report or dataset appeared first on Kasper On BI.

0 views