Forum Discussion
Import Dataflow JSON via Power BI Rest API with Powershell
- 2 years ago
For anyone else coming across this issue the solution turned out to be (thanks to some help and guidance from microsoft support) to remove the "partitions" section at the bottom of the import json file.
Steps to get there were
1. Export the dataflow as JSON.
2. Change the allowNativeQueries value to be "false" (you get a clear warning about this)
3. Remove the partition section at the bottom of the file
4. Use Postman to submit the file
Since I to perform this action via powershell I was able to export the required powershell comments from postman saving me having to fight with how to submit the multipart post.
It should also be noted that when you submit the dataflow the id you get back is the "Import ID". Not the dataflow ID as first thought. This ID can be submitted to the
https://api.powerbi.com/v1.0/myorg/groups/{workspaceid}/imports/{importid} endpoint with returns the status iof the import including the dataflow id once its finally succeded.
For anyone else coming across this issue the solution turned out to be (thanks to some help and guidance from microsoft support) to remove the "partitions" section at the bottom of the import json file.
Steps to get there were
1. Export the dataflow as JSON.
2. Change the allowNativeQueries value to be "false" (you get a clear warning about this)
3. Remove the partition section at the bottom of the file
4. Use Postman to submit the file
Since I to perform this action via powershell I was able to export the required powershell comments from postman saving me having to fight with how to submit the multipart post.
It should also be noted that when you submit the dataflow the id you get back is the "Import ID". Not the dataflow ID as first thought. This ID can be submitted to the
https://api.powerbi.com/v1.0/myorg/groups/{workspaceid}/imports/{importid} endpoint with returns the status iof the import including the dataflow id once its finally succeded.