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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Dynamic Management View (DMV) queries against PowerBI model. How to automate load into DB?

Hi 
I have been using SQL Server Management Studio to manually execute DMVs to query XMLA endpoints in our PowerBI Premium workspaces. These queries return useful information on the underlying PBI SSAS database such as:

  • M expressions in the model
  • Tables in the model
  • Relationships between the tables
  • Measures & DAX
  • Calculated columns

I would like to programtically extract the above information from all our PowerBI Premium workspaces and load it into a central database (probably SQL Azure DB) for further analysis. However,  I am struggling to find relevant information (and examples) on the more complex querying capabilities of DMVs, and scheduling DMVs. Can anyone provide any insight (or links) as to whether:

 

Any advice, during this early planning stage would be welcome

Cheers
Steve

4 REPLIES 4
tackytechtom
Super User
Super User

Hi guys,

 

Though late to the party, I'd like to share two blog posts that might be of help for others.

 

If you'd like to analyse the model with Power BI, why not directly connecting Power BI with the meta data of the dataset? This post shows a way to do this:

https://www.tackytech.blog/how-to-build-meta-reports-on-top-of-power-bi-datasets-with-dynamic-manage...

 

If you really want to save the data from the DMVs into a database (i.e. Azure SQL Database), you can look into the following one, too. The blog post uses Azure Data Factory, but you could use any other tool really. It utilises the "executeQueries" Power BI API in a copy activity (source: executeQueries API, target: Azure SQL Database). Interesting enough you can not only query the meta data (via DMVs) from the dataset but also the actual tables.

https://www.tackytech.blog/how-to-query-and-copy-data-from-power-bi-datasets-via-azure-data-factory/

 

Hope this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

vanessafvg
Super User
Super User

https://www.fourmoo.com/2021/11/24/how-did-i-keep-my-power-bi-dataset-measures-documented-and-up-to-...





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




amitchandak
Super User
Super User
Anonymous
Not applicable

Hi @amitchandak Thanks for your suggestion. 

We aren't in a position to change our Enterprise Architecture. So this isn't an option.

Thanks again

Steve

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors