Forum Discussion

olegkazanskyi's avatar
olegkazanskyi
Helper II
4 years ago
Solved

XMLA dataset tables created with dataflow do not have M code

We want to pull M code from Power BI Service to get information that we can't with using API, like a specific stored procedure used in a table, all appends and merges etc.

 

This code shows all dataset M Queries

select * from
$system.discover_m_expressions

 

But when I run it for a dataset built completely from dataflows, it doesn't show anything!

Is it a bug?

  • Hi,

    That returns any shared expressions in M which I thought were things like parameters and functions.

     

    In tabular for modern data sources like data flows the M expressions are stored in the table partition which can be accessed with:

     

    SELECT *
    FROM $SYSTEM.TMSCHEMA_PARTITIONS

     

5 Replies

  • bcdobbs's avatar
    bcdobbs
    Community Champion

    Hi,

    That returns any shared expressions in M which I thought were things like parameters and functions.

     

    In tabular for modern data sources like data flows the M expressions are stored in the table partition which can be accessed with:

     

    SELECT *
    FROM $SYSTEM.TMSCHEMA_PARTITIONS