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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
TBardien
Helper I
Helper I

API call Datasets Get Tables DO NOT WORK

I am trying to fetch Tables for a dataset from the API.

I have tried 

client.Datasets.GetTablesInGroupAsync(
client.Datasets.GetTablesAsync(
client.Datasets.GetTablesInGroup(

none of them work. They all throw the same error: Operation returned an invalid status code 'NotFound'

How do I go about fetching the Tables for a dataset?

4 REPLIES 4
ed-freeman
Advocate II
Advocate II

As @lbendlin has said, it seems like you're using the Push Datasets API, which won't work if you're using just a "standard" dataset.

If the dataset resides in a workspace assigned to a Premium (or Embedded) capacity, you can use the Tabular Object Model (TOM) or the ADOMD .NET Client Library (that one is .NET Core, but there are .NET Framework versions) to speak to the underlying Analysis Services (AS) model through the XMLA endpoint. You can see this blog for an example on how to query measures for an AS model - it's an example using Azure Analysis Services, but the same logic applies to the Power BI XMLA endpoint. It's also querying measures, not tables - but the same logic applies.

If you're not using Premium/Embedded, your options are a bit more limited. One far-from-ideal way to get the Table names would be to unzip the pbix file and look in the DiagramLayout file, which lists all the tables in the dataset. But without knowing what exactly you're trying to do in your scenario, I'm not sure whether that's a feasible solution.

Hope this helps,

Ed

lbendlin
Super User
Super User

Try it out in the sandbox.

 

https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets/datasets_gettablesingroup

 

Worked for me. NOTE: This call is only working with Push datasets. 

@lbendlin  What is the difference between a dataset and a push dataset?

Dataset : you own it and manipulate it via .pbix. you can selectively change its data

Push dataset: Azure owns it and you can only post to it and query it. There is no .pbix. you cannot change its data after posting/pushing. Only full delete and start over.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.