Forum Discussion
Get number of rows for table partition
I would like to get regurarly info about number of rows for each partition on several models. I used TOM, but there is no such info (it seems so). I tried Power BI Rest API, but here I get "Error: 404 - {"error":{"code":"ItemNotFound","message":"Dataset XXX is not Push API dataset."}}".
How to get the same info as in SSMS?
Allegedly via
select * from $SYSTEM.DISCOVER_XML_METADATAor
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis"> <RequestType>DISCOVER_XML_METADATA</RequestType> <Restrictions /> <Properties> <PropertyList> <Content>Data</Content> </PropertyList> </Properties> </Discover>but I can't get that to work in Power BI, and in PowerShell it only goes to the database level, not the table level. Wonder if you could do some network sniffing when running the advanced metrics (or meta data refresh) in DAX Studio.
- Anonymous1 year ago
Thanks for the reply from lbendlin , please allow me to provide another insight:
Hi, porcarius
Regarding your question, I have also found the following information:
TMSCHEMA_PARTITIONS
DISCOVER_PARTITION_DIMENSION_STAT
DISCOVER_PARTITION_STAT
For details, please refer to:
Dynamic Management Views (DMVs) in Analysis Services | Microsoft Learn
$PARTITION (Transact-SQL) - SQL Server | Microsoft Learn
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
As I said - do a network sleuth on what DAX Studio does. It can show these metrics either without the permissions or by elevating them somehow.
5 Replies
- lbendlin
Super User
Allegedly via
select * from $SYSTEM.DISCOVER_XML_METADATAor
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis"> <RequestType>DISCOVER_XML_METADATA</RequestType> <Restrictions /> <Properties> <PropertyList> <Content>Data</Content> </PropertyList> </Properties> </Discover>but I can't get that to work in Power BI, and in PowerShell it only goes to the database level, not the table level. Wonder if you could do some network sniffing when running the advanced metrics (or meta data refresh) in DAX Studio.
- AnonymousNot applicable
Thanks for the reply from lbendlin , please allow me to provide another insight:
Hi, porcarius
Regarding your question, I have also found the following information:
TMSCHEMA_PARTITIONS
DISCOVER_PARTITION_DIMENSION_STAT
DISCOVER_PARTITION_STAT
For details, please refer to:
Dynamic Management Views (DMVs) in Analysis Services | Microsoft Learn
$PARTITION (Transact-SQL) - SQL Server | Microsoft Learn
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- porcariusRegular Visitor
I get an error:
Executing the query ...
Obtained object of type: Microsoft.AnalysisServices.AdomdClient.AdomdDataReader
The '<euii>xxx</euii>' user does not have permission to call the Discover method.
Any suggestion?
The query to other DMVs than DISCOVER* works well, e.g.: select * from $SYSTEM.TMSCHEMA_PARTITIONS
I am on Power BI Premium Capacity, XMLA is ReadWrite.- lbendlin
Super User
As I said - do a network sleuth on what DAX Studio does. It can show these metrics either without the permissions or by elevating them somehow.