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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
StefanKainz
Frequent Visitor

Push Dataset create table API

Hello,

 

I've created a push dataset with two tables via API as documented here: Push Datasets - Datasets PostDataset - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

Now I'd like to add another table to the existing dataset, but couldn't find an API to do this. Can anyone give me a hint how to do this?

 

The PutTable API (Push Datasets - Datasets PutTable - REST API (Power BI Power BI REST APIs) | Microsoft Learn) only allows to change an existing table, but not creating one.

 

BR Stefan

9 REPLIES 9
v-shex-msft
Community Support
Community Support

Hi @StefanKainz ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
lbendlin
Super User
Super User

My experience is that it is faster to start over. Prepare the meta data for both tables, and then (re)fill them. You can use SSMS if that's more convenient for you.

What do you mean by starting over again? When the push dataset already exists, how can we start over without losing any settings/permissions we have already done?

 

The scenario is like we have two production machines that collect data in different intervalls, lets say every 10 seconds for machine1 and every 20 seconds for machine2. That are the two tables that already exists. We push data to these two tables via API over the day and delete the data once every night and refill them with the last 4 hours of data.

 

How to add another table for one more machine (machine3) that collects data every 30 seconds?

delete all tables and then submit a single combined request to create the new table structures.  Then fill these new tables.

 

You may be trying to use push datasets in a way that they were not designed for. You may want to look at alternatives like streaming datasets.

... submit a single combined request to create the new table structures


That is exactly my trouble. The question is: HOW to create the new table structures?

Like this

https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset-in-group

 

 

{
  "name": "Demo Export",
  "defaultMode": "Push",
  "tables": [
    { "name": "table1",
      "columns": [
        {
          "name": "Result",
          "dataType": "Int64"
        }
      ]
    },{ "name": "table2",
      "columns": [
        {
          "name": "fieldName",
          "dataType": "string"
        }
      ]
    },{ "name": "table3",
	  "columns": [
		{
		  "name": "ROWID",
		  "dataType": "string"
		}
	  ]
	}
  ]
}

 

Looking at my notes it actually seems to be possible to add a table.

https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-put-table-in-group

 

{
"name": "table3",
"columns": [
{
"name": "ROWID",
"dataType": "string"
}
]
}

 

 

Hello @lbendlin,

thank you once more for your reply.

 

We cannot delete and recreate the whole dataset as explained. All depending reports and dashboard tiles would be gone too. So this is not an option.

 

I tried to create a new table with https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-put-table-in-group, but got the following errormessage:

{
    "error": {
        "code": "ItemNotFound",
        "message": "Table '<ccon>newTable</ccon>' not found in dataset 'sobe_wowvirtualserver|53ad1280-07a7-41dc-95cb-f5a283c199cb'"
    }
}

 

Any further suggestions?

 

BR Stefan

We cannot delete and recreate the whole dataset as explained

Power BI datasets semantic models are ephemeral. You MUST be able and ready to recreate them at any time. Do not rely on Power BI for any sort of long term storage.

 

Can you show the XMLA?

 

(If you think about the effort you have already put in all of this - would it have been quicker to start from scratch?)


Do not rely on Power BI for any sort of long term storage.

We do not rely on Power BI for long term storage, no worries. We keep all the data and schema safe at another service. We cannot drop and recreate the dataset because we plan potentially dozens of reports and dashboards that would be gone/break when dropping the dataset semantic model.

 


If you think about the effort you have already put in all of this - would it have been quicker to start from scratch?

At the moment we start from scratch every day a few times. We are just evaluating the possibilities we have with push datasets. And we use to take all the necessary time to make sustainable architectural decisions.

 

Thanks again for all your explanations. For me it's clear now that it is not possible to add a table to an existing push dataset after it has been created and we have to find another solution to work with changing requirements.

 

BR Stefan

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.