Forum Discussion
Push Dataset create table API
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?
- 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
- lbendlin2 years agoSuper User
We cannot delete and recreate the whole dataset as explainedPower BI
datasetssemantic 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?)