The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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?
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
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.
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
14 | |
12 | |
3 | |
3 | |
2 |