Forum Discussion
Push Dataset create table API
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.
- StefanKainz2 years agoFrequent Visitor
... 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?
- lbendlin2 years agoSuper User
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" } ] }- StefanKainz2 years agoFrequent Visitor
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