-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while trying to upload a pbix file to powerbi server #304
Comments
Hi Jaime, |
There is a different api for large files which will need the implementation for large files, we do welcome community contributions to add additional functionality |
Hi Jaime, |
Improvements in the commands are provided by the open source community, I encourage you to add the new feature and send a Pull Request for it |
I would suggest to categorise the issues a bug since its not working.We have tried a lot to fix the issue but no use.It would be better if we can reach out to the person who has implemented this module so tht he can better understand the issue and can resolve quickly. |
Sridhar, I think there's a little bit of confusion here. When you asked if it is possible to give you a timeframe on when this API will be implemented... it already is implemented. If you go try to upload a 100KB Power BI .pbix file with your browser on the PBIRS portal and inspect the traffic of your upload, you'll notice that the "/Reports/api/v2.0/catalogitems" endpoint is used to upload your file. Try to upload a 512MB file and you'll notice that the endpoint your browser will hit changes to something like "/Reports/api/v2.0/PowerBIReports(Path={})/Model.Upload." If you look at the API documentation here and look up the documentation for /DataSets({Id})/Model.Upload, you'll see the definition says it "does an efficient binary upload of a new or existing DataSet CatalogItem from a multipart/form-data request. Use of this API is recommended for files larger than 25 MB in size." This is the endpoint you want! It's exists! It's real and you're ALREADY USING IT! This PowerShell library is something called an "API wrapper"--it simply wraps those REST API calls and makes them easier to reference via PowerShell (well, PowerShell in this case--API wrappers can be in any language). So no, the "easy button" is missing, but the functionality is there and you can build this yourself with a bit of effort. |
Hi Pedro, Thanks a lot for suggestion.I tried to inspect the traffic from browser and thats exactly what you have mentioned.I can see the The endpoint as "/Reports/api/v2.0/PowerBIReports(Path={})/Model.Upload.Tried to update the code in below block (commented with #)but no luck.Is it possible to look in to this for you?
|
Here's what a working script looks like, I published it via a gist.. I'd consider it a rough draft, but it's the best you're going to get for now! Perhaps if I get some additional time I can clean this up and contribute it to the project. It worked with a 200MB PBIX for me--I hope it works for you too. |
Some updated? |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Error while trying to upload a large .pbix file(size >300MB) to Powerbi server using the powershell script Write-RsRestCatalogItem..The script is working fine for .pbix file sizes <200mb apprx.Looks ther eis some problem at Invoke-webrequest ...Parameter body in invokewebrest is unable to handle the bytes.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Write-RsRestCatalogItem -WebSession $session -Path $PBIXFile -RsFolder $DeploymentFolderLocation -Verbose -Overwrite
Write-RsRestCatalogItem : System.Exception: Failed to create catalog item: The remote server returned an error: (422) Unprocessable Entity. ---> System.Net.WebException: The remote
server returned an error: (422) Unprocessable Entity.
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
--- End of inner exception stack trace ---
What is the expected behavior?
Should upload without issues
Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
All powershell versions and windows 10.
The text was updated successfully, but these errors were encountered: