Forum Discussion
Power BI REST API Import Dataflow Overwrite error (DuplicatePackageNotFoundError issue in 2023)
You can raise an issue at https://issues.powerbi.com . If you have a Pro license you can consider raising a Pro ticket at https://powerbi.microsoft.com/en-us/support/pro/
- dbeavon33 years ago
Memorable Member
Hi lbendlin
Do you understand any part of the language from this message (DuplicatePackageNotFoundError)?
What is a "package"? Why and when is it "duplicated"? Why would it matter if a duplicated package couldn't be found?
Nothing about this message seems to intersect with my understanding of dataflows.
The only thing I can guess is that it is an internal/technical message that Microsoft never intended to be seen by customers. Also the language is so strange that I'm guessing that it is related to some internal dependency that the dataflow is relying on (like an azure storage account for the storage of the dataflow results or something).
- lbendlin3 years ago
Super User
Your guess is as good as mine (wich is that this call requires the dataflow JSON to exist to be overwritable, but sometimes cannot find it) but my suggestion is to ask the Microsoft technical support team to explain it .
- dbeavon33 years ago
Memorable Member
Here are two examples of powershell libraries that are buggy, as a result of the problems with Microsoft's underlying REST api (for dataflow imports):
- https://github.com/microsoft/powerbi-powershell/blob/master/examples/dataflows/
- https://github.com/marclelijveld/Power-BI-Automation
I've been working with this Microsoft PG for over a month now and they are NOT willing to fix their bugs so far. They claim the underlying buggy behavior is "by design" and that using any permutation of "overwrite" for the conflict handler is "not supported". In other words, the only thing that Microsoft want you to do with this API is upload brand new dataflows. It seems totally pointless since the first time you upload a dataflow you must configure gateway, data source connections, and refresh schedules, etc. Not all of these operations appear like they can be automated. So it defeats the entire purpose of this REST API since the real payout isn't attained until multiple updates can be performed in an automated way by REST (eg. by way of CI/CD deployments for example).
Given the fact that there are two github repros with examples of using "overwrite", it seems possible/likely that this worked in the past and then was subsequently broken.
I haven't closed my support case yet. And I did get them to share the fact that other customers have reported the same bug. There is even a bug tracking ID. (below)
The title of the bug is "REST API - imports with parameter CreateOrOverwrite throws PackagenotfoundError" and it was created on 5th Sept 2022.
Here is the Bug ID: 875909
Sadly Microsoft doesn't seem to write KB articles about their bugs nowadays (am I a graybeard?) So I don't think you will find this information in an authoritative format from Microsoft. Nor is it likely that they will give you a workaround for your occurrences of DuplicatePackageNotFoundError.