Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DomFernandez
Regular Visitor

PowerBI API execute Query throwing error for certain tables/columns

Hi everyone,

when trying to execute 

POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/executeQueries

 

against tables:

$SYSTEM.TMSCHEMA_TABLES

-  $SYSTEM.TMSCHEMA_COLUMNS

 

using query  SELECT * from $SYSTEM.TMSCHEMA_COLUMNS / SELECT * from $SYSTEM.TMSCHEMA_TABLES

we get the following error.

 

b'\xef\xbb\xbf{"results":[{"error":{"code":"DataExtensionError","message":null,"details":[{"code":"AnalysisServicesErrorCode","detail":{"type":"1","value":0}}]}}]}'

We investigated a little bit, finding out that as long as you only select columns without integers, the call works perfectly fine. However the moment we select columns with integers, error message above appears.

 

Any idea how we can overcome that issue, as we would at least need the column types which are parsed as integers?

Thanks alot for your support.

4 REPLIES 4
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @DomFernandez - I am surprised that you managed to get any data from the $SYSTEM tables new the REST API.  These normally expect DAX query instead of the DMV query.   The DMV query would work using the XLMA endpoint in SMSS or Tabular Editor.  It will be interesting if this is possible using the Rest API instead.

Anonymous
Not applicable

Yes @Daryl-Lynch-Bzy 
the REST API for executequeries on dataset generally made available from May 2022 update.

Hi @Anonymous & @DomFernandez - that is correct, and I am aware of that, but the document clearly states the first sentence: "Executes Data Analysis Expressions (DAX) queries against the provided dataset."  {link}

You are executing SQL query or DMV query which works with the XLMA Endpoint, so I am not sure that it will compatible with the REST API.

Hi @Daryl-Lynch-Bzy,

valid point.

 

Thanks for your answer.

More or less we just thought to give it a try with DMV Queries, which as described works to a certain extent. So I was wondering whether anyone else tried it so far and found some way to solve the problem we faced.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.