cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jhonatas
Frequent Visitor

Update dataset published via Power BI API

Hello guys!

 

Today im doing some tests with Power BI API.

I already downloaded the console sample and the web sample. And created some datasets/reports to test.

 

I used the console app do do this, the option was "6 - Import PBIX Desktop file into an existing workspace".

 

This works good, but now my doubt is, how i can update the previosly created dataset?

 

Searching around i found the AddRows method but im afraid that this is not a trivial thing. In the examples i see they create a json with the new rows and add to the table. I think im misunderstanding something. When i update my desktop pbix file i dont know what is the new rows? Someone can help me here? Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft Eric_Zhang
Microsoft

Re: Update dataset published via Power BI API

@jhonatas

 

You can do the update by re-importing the new pbix file.

There's an argument nameconfilict for PostImportWithFileAsync, and as per this github sample, the argument value "Overwrite" can be used to overwrite the already existing dataset. However "Overwrite" seems a invalid status code based on my testing and I haven't found the correct status code yet so far.

As a workaround, you might to use the PowerBI-Cli to overwrite, check Updating existing workspaces with a new pbix file #22.

View solution in original post

2 REPLIES 2
Microsoft Eric_Zhang
Microsoft

Re: Update dataset published via Power BI API

@jhonatas

 

You can do the update by re-importing the new pbix file.

There's an argument nameconfilict for PostImportWithFileAsync, and as per this github sample, the argument value "Overwrite" can be used to overwrite the already existing dataset. However "Overwrite" seems a invalid status code based on my testing and I haven't found the correct status code yet so far.

As a workaround, you might to use the PowerBI-Cli to overwrite, check Updating existing workspaces with a new pbix file #22.

View solution in original post

jhonatas
Frequent Visitor

Re: Update dataset published via Power BI API

Yeah, nameConflict parameter works here!

At the beggining i was getting error when i have two files with the same dataset name.(idk, but this is possible), so the overwrite dont know what file to replace.

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors