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.
We want to scan datasets M codes using XMLA endpoint to get information on how tables have been created.
We found that we can do this for tables created from Excel, SQL, manual inputs.
But the tables created from dataflow are not shown in the list of M Queries.
I use this command to request M codes:
select * from
$system.discover_m_expressions
I think my solution on this post might help:
You need to access the M code from the table partitions:
SELECT *
FROM $SYSTEM.TMSCHEMA_PARTITIONS
@bcdobbs This is aweome to say the least !!! Fantastic !!! Thanks for sharing.
All sorts of fun available...
Following code gives you list of all those queries:
SELECT * FROM $System.DBSchema_Tables
WHERE TABLE_TYPE = 'SCHEMA'
ORDER BY TABLE_NAME ASC
which is from Dynamic Management Views (DMVs) in Analysis Services | Microsoft Docs
Are you expecting to retrieve the M code that generates the dataflow or just some M code that connects to the dataflow? I don't think the former exists within a Power BI dataset.
@AlexisOlson OP is referring to this
@v-rahyadav "But the tables created from dataflow are not shown in the list of M Queries" - yes it does not work there. I have tested it and I guess the only tables that show up there are the ones exclusively created through M.
There isno DMV there.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |