microsoft / PowerBI-Cli

Power BI command line tool for managing Power BI Embedded workspace collections
Other
99 stars 40 forks source link

`Overwrite` option is not working #9

Open ghost opened 8 years ago

ghost commented 8 years ago

I have checked and see that overwrite option is not working for now. It might be a bug from server, not cli, because I check with C# code, it's not working also:

C:\consoleZ>powerbi get-datasets
[ powerbi ] =========================================
[ powerbi ] Gettings datasets for Collection: a0702aef-ae4d-4d78-b1f4-ef8440cd3d89
[ powerbi ] =========================================
[ powerbi ] ID: d44a7b18-fa74-46aa-8a17-49c95ffb0798 | Name: Vanilla
[ powerbi ] ID: 6bb12ae4-ffe1-4be2-a086-3ca0ebf854c4 | Name: HR

C:\consoleZ>powerbi import -f C:\GitHub\PowerBI\HR_Dashboard.beta.pbix -n HR2
[ powerbi ] Importing C:\GitHub\PowerBI\HR_Dashboard.beta.pbix to workspace: a0702aef-ae4d-4d78-b1f4-ef8440cd3d89
[ powerbi ] File uploaded successfully
[ powerbi ] Import ID: 1567f9b6-0c8b-42ce-910f-9f3207a4c8f3
[ powerbi ] Checking import state: Publishing
[ powerbi ] Checking import state: Publishing
[ powerbi ] Checking import state: Publishing
[ powerbi ] Checking import state: Succeeded
[ powerbi ] Import succeeded

C:\consoleZ>powerbi get-datasets
[ powerbi ] =========================================
[ powerbi ] Gettings datasets for Collection: a0702aef-ae4d-4d78-b1f4-ef8440cd3d89
[ powerbi ] =========================================
[ powerbi ] ID: d44a7b18-fa74-46aa-8a17-49c95ffb0798 | Name: Vanilla
[ powerbi ] ID: 6bb12ae4-ffe1-4be2-a086-3ca0ebf854c4 | Name: HR
[ powerbi ] ID: 9fc76a2e-9d05-44ac-8ecd-ffa4eaefc6e8 | Name: HR2

C:\consoleZ>powerbi import -f C:\GitHub\PowerBI\HR_Dashboard.beta.pbix -n HR2 -o
[ powerbi ] Importing C:\GitHub\PowerBI\HR_Dashboard.beta.pbix to workspace: a0702aef-ae4d-4d78-b1f4-ef8440cd3d89
[ powerbi ] read ECONNRESET
wbreza commented 8 years ago

@craigb / @tonyferrell - Can you check if there is an issue with overwrite on the server side?

wbreza commented 8 years ago

@craigb / @tonyferrell Ping

ghost commented 8 years ago

I have the same issue with powerbi cli

powerbi import -c ... -w xyz -k ... -f C:\...\dashboard.pbix -n dashboard -o

[ powerbi ] Importing C:\...\dashboard.pbix to workspace: xyz
[ powerbi ] read ECONNRESET

I tried the PowerBI embedded sample from https://github.com/Azure-Samples/power-bi-embedded-integrate-report-into-web-app

When I import an new report with the same name, its also not updating but creating a new report with same name...

wbreza commented 8 years ago

We've identified a bug in the API backend regarding this issue. We'll provide tracking updates here.

wbreza commented 8 years ago

A workaround for the time being is to delete the dataset and re-import with the same name without the overwrite flag.

ghost commented 8 years ago

The workaround does not work in my case because I need to keep reportId (actually embeddedUrl) unchanged when the new pbix is updated

wbreza commented 8 years ago

Understood - I will bring this feedback to the team.

campuslogic commented 8 years ago

Any update on this issue?

wbreza commented 8 years ago

@aluong - Do you have an update on this issue?

ghost commented 8 years ago

@wbreza and @aluong: Is there any update for this issue?

wbreza commented 8 years ago

The fix is being finalized this week and will then be slated for release.

kenmcewan commented 8 years ago

any update on the release for this fix ?

rysmit commented 7 years ago

I am experiencing this issue as well. @wbreza any update?

gsamant commented 7 years ago

I am still experiencing this issue. Is there any update?

wbreza commented 7 years ago

@gsamant - Last I checked this was working. Are you passing the -o flag?

ghost commented 7 years ago

It's working for me at the moment

simonaberry commented 7 years ago

do you need to pass any value after -o (true/false or 'Overwrite'), or just -o by itself ?

I find I get a'DuplicatePackageNotFoundError' error if passing a value....

ernestochaves commented 7 years ago

The DuplicatePackageNotFoundError I believe is because you are passing -o on report creation. The command seems to expect a report to overwrite, otherwise gives you an error. @simonaberry

tushu1984 commented 7 years ago

Hi I am using Powerbi Import CLI command but still it is not allowing me to overwrite exsiting report Please can someone let me know if this still an open issue Also what we need to pass after -o as parameter for overwriting

ernestochaves commented 7 years ago

@tushu1984 I don't think it is an issue as we use it regularly. I had an issue with the -o switch, basically I do -o true, if the report already exists. If you use the switch on a report that doesn't exists yet it gives you the DuplicatePackageNotFoundError.

tushu1984 commented 7 years ago

@ernestochaves Previously i used this command for import powerbi import -c $CollectionName -w $WSguid -k $accesKeyPBI -f $fileName -n $fileName But by default overwrite is false so it creates duplicate file entry in workspace then i tried giving this powerbi import -c $CollectionName -w $WSguid -k $accesKeyPBI -f $fileName -n $fileName - o true After this it started giving me duplicatepackage notfound error... Dont know why its not working

ernestochaves commented 7 years ago

@tushu1984 the error means the file still doesn't exist yet. The way it seems to work is, you need to do a first time import and use the override option only with reports that are already there. Does that make sense? Add "- o true" only if the report already exists.

tushu1984 commented 7 years ago

@ernestochaves this still not working for me .. i tried importing same file which was present in the workspace but still received this error now [ powerbi ] x-powerbi-error-info : MoreThanOneDuplicatePackageFoundError

ernestochaves commented 7 years ago

@tushu1984 sorry to hear that. Can you show us a list of the reports you already have in that workspace? Im just guessing here, but maybe you already have several versions of the same report and it doesnt know which one to overwrite. Also, could you show the command?

DataEngineer7801 commented 5 years ago

I am experiencing this now, first time trying to add the nameConflict=Overwrite parameter to the URL. Calling https://api.powerbi.com/v1.0/myorg/groups/{}/imports?datasetDisplayName={}&nameConflict=Overwrite to push a .pbix file from storage to target workspace. Workspace has no existing reports or datasets when I make the request. Response is 404 with

{
    "error": {
        "code": "DuplicatePackageNotFoundError",
        "pbi.error": {
            "code": "DuplicatePackageNotFoundError",
            "parameters": {
                "DuplicatePackagesFullMatch": null
            },
            "details": []
        }
    }
}

Can work around it for now, but it'd be great to get a fix for this.

ali-hamud commented 5 years ago

This npm package is deprecated.

balintbako commented 4 years ago

I am experiencing this now, first time trying to add the nameConflict=Overwrite parameter to the URL. Calling https://api.powerbi.com/v1.0/myorg/groups/{}/imports?datasetDisplayName={}&nameConflict=Overwrite to push a .pbix file from storage to target workspace. Workspace has no existing reports or datasets when I make the request. Response is 404 with { "error": { "code": "DuplicatePackageNotFoundError", "pbi.error": { "code": "DuplicatePackageNotFoundError", "parameters": { "DuplicatePackagesFullMatch": null }, "details": [] } } }

Can work around it for now, but it'd be great to get a fix for this.

That occurs when Overwrite is enabled but there is nothing to Overwrite. Switch to Abort nameConflict. The full solution is to check if there is a need to overwrite or not before making the import.

Regards, Balint