Forum Discussion

porcarius's avatar
porcarius
Regular Visitor
1 year ago
Solved

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: 40...
  • lbendlin's avatar
    1 year ago

    Allegedly via 

     

     

    select * from $SYSTEM.DISCOVER_XML_METADATA

     

     

    or

     

     

    <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.

  • Anonymous's avatar
    Anonymous
    1 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.

  • lbendlin's avatar
    lbendlin
    1 year ago

    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.