Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
iain_robertson
Regular Visitor

Testing Database Changes Against Suite of Reports

Hi All, 

 

I've inherited a mature SQL Server data environment that has been completely uncontrolled for a long time. It had been run as a single production server environment, i.e. no dev or test servers. It contains significant amounts of redundant code and objects that I'd like to clear out. But. We also have a large PBI estate, spread across 20+ workspaces and with many reports run on an ad-hoc and infrequent basis. 

 

I have set up a test server that mirrors my production environment. As I remove what I believe to be redundant objects, I need to verify that this won't break any of the existing PBI reports by executing them against the test server. 

 

Given the volume of reports involved, I don't want to do this manually. So how can I do this programatically? 

 

I've done some investigation of the PBI API, but this hasn't helped. I was hoping that I could simply extract the object names / query definitions from the reports and then execute these against the test server. But this doesn't appear to be possible. 

 

I have implemented an extended events session on the production server to trap queries generated by PBI. But this won't capture everything - only the reports that are executed in the period that the session is running for. 

 

This must be a solvable problem. Thoughts and advice appreciated. 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Use the Scanner API to harvest all queries for the Power BI data sources. That will tell you which SQL server tables, views etc are contributing.

View solution in original post

2 REPLIES 2
iain_robertson
Regular Visitor

That did the trick, thank you. For future viewers of this topic, I needed to create a scan request via a PostWorkspaceInfo call, wait for this to complete successfully and then get the results using GetScanResult. This returns a huge amount of very useful information about your PBI setup. 

 

Admin - WorkspaceInfo PostWorkspaceInfo - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Admin - WorkspaceInfo GetScanResult - REST API (Power BI Power BI REST APIs) | Microsoft Learn

lbendlin
Super User
Super User

Use the Scanner API to harvest all queries for the Power BI data sources. That will tell you which SQL server tables, views etc are contributing.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.