Forum Discussion
REST API Dataset Queries
Hello,
I would like to check if a certain filter is applied on every Power Query query that is used to build and refresh the datast.
Is there a way to programatically see thw query code for every query?
Thanks
Run a DMV query against the dataset.
select * from $SYSTEM.TMSCHEMA_PARTITIONS
You can use DAX Studio or any other tool that can access the XMLA endpoint.
5 Replies
- lbendlin
Super User
Run a DMV query against the dataset.
select * from $SYSTEM.TMSCHEMA_PARTITIONS
You can use DAX Studio or any other tool that can access the XMLA endpoint.
- AnonymousNot applicable
Hi lbendlin
I am trying to write python code for executequeries REST API
I am able to other REST API queries without any problem.
but Executequeries
--https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/executeQueries
i don't have any clue where i can write the DAX query...and how can i write it.
I gone through the documentation https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries
but still not getting where i need to write the query and how to pass it
https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/executeQueries
here
if possible can you please let me know how can execute this in python. (any dax query is fine)- lbendlin
Super User
No idea why you would want to do this in Python. But if you insist then you need to construct the body according to this example
Datasets - Execute Queries - REST API (Power BI Power BI REST APIs) | Microsoft Docs
including all the character escapes etc. It must be in this format , otherwise it will not work.