Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Part of our deployment process is upload pbix files to the apropriate workspace based on environment, etc. And this deployment process uses the powerbi rest api's import method to do this. We use parameters in the dataset which tells the powerbi report which server to authenticate too. But when using the import api method the parameters do not come across. The only way I have found to get the parameters into the dataset is to use the publish button which is inside the powerbi fat client. I have also verified the parameters do not come across when using the import method by viewing the parameters in powerbi.com which is blank and also by calling the powerbi rest api get parameters method which returns no parameters.
So the question is there a limitation on using the import api rest method that does not allow the parameters to be pulled into the dataset?
Note 1: I have verified that the "Enable Load" has been checked on the parameter and it has no effect on the issue.
Note 2: A working example of a postman call showing how I import the pbix file. It works great, just doesn't import the parameters that exists already in the pbix file. (values are scrubbed):
POST /v1.0/myorg/groups/xxx/imports?datasetDisplayName=mydataset001&nameConflict=CreateOrOverwrite HTTP/1.1
Host: api.powerbi.com
Authorization: Bearer xxxx
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Cache-Control: no-cache
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="filePath"
C:\VSTS\Dev4\Development\Reporting\PowerBI\DeploymentFiles\myparametertestfile.pbix
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name=""; filename="myparametertestfile.pbix"
Content-Type:
------WebKitFormBoundary7MA4YWxkTrZu0gW--
Thanks.
Solved! Go to Solution.
I had a discussion with Microsoft and found that if the parameters are not being used in the advanced query editor then when using the powerbi rest api import method the parameters will not be migrated. So you must be using these parameters in some way otherwise the parameters will not make it into the dataset.
Part of our deployment process is upload pbix files to the apropriate workspace based on environment, etc. And this deployment process uses the powerbi rest api's import method to do this. We use parameters in the dataset which tells the powerbi report which server to authenticate too. But when using the import api method the parameters do not come across. The only way I have found to get the parameters into the dataset is to use the publish button which is inside the powerbi fat client. I have also verified the parameters do not come across when using the import method by viewing the parameters in powerbi.com which is blank and also by calling the powerbi rest api get parameters method which returns no parameters.
So the question is there a limitation on using the import api rest method that does not allow the parameters to be pulled into the dataset?
Note 1: I have verified that the "Enable Load" has been checked on the parameter and it has no effect on the issue.
Note 2: A working example of a postman call showing how I import the pbix file. It works great, just doesn't import the parameters that exists already in the pbix file. (values are scrubbed):
POST /v1.0/myorg/groups/xxx/imports?datasetDisplayName=mydataset001&nameConflict=CreateOrOverwrite HTTP/1.1
Host: api.powerbi.com
Authorization: Bearer xxxx
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Cache-Control: no-cache
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="filePath"
C:\VSTS\Dev4\Development\Reporting\PowerBI\DeploymentFiles\myparametertestfile.pbix
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name=""; filename="myparametertestfile.pbix"
Content-Type:
------WebKitFormBoundary7MA4YWxkTrZu0gW--
Thanks.
I had a discussion with Microsoft and found that if the parameters are not being used in the advanced query editor then when using the powerbi rest api import method the parameters will not be migrated. So you must be using these parameters in some way otherwise the parameters will not make it into the dataset.
There are separate REST APIs for querying and setting parameter values.
Check out: https://azure.microsoft.com/en-us/updates/power-bi-embedded-query-parameters-api/
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |