Forum Discussion
How to audit datasets in a workspace for Native SQL usage vs direct table connection
- 6 months ago
Hii Frankllina
Power BI Service does not expose Power Query (M) code, so you cannot directly audit Native SQL vs direct table connections from a workspace UI. The only accurate method is to use the XMLA endpoint (Premium/PPU required) or REST API + Tabular Object Model (TOM) to extract each dataset’s M expressions (partitions/data sources) and programmatically scan for patterns like Value.NativeQuery or hard-coded SQL. If the M code shows direct navigation (e.g., Sql.Database(...){[Schema=...,Item=...]}), it’s direct table/view access. There is no built-in report in Power BI Service that provides this classification.
Hi Frankllina
Thank you for submitting your question to the Microsoft Fabric Community Forum, and thanks to rohit1991 and MohdZaid_ for helpful suggestions.
Could you let us know if the suggested solution resolved your issue? If not, please share any additional details so we can assist further.
Best regards,
Community Support Team.
- v-achippa5 months agoCommunity Support
Hi Frankllina,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.
Thanks and regards,
Anjan Kumar Chippa