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

Deploy powerbi report using powershell with new dataset Id

I have powerbi report connecting to existing dataset in a workspace (used powerbi desktop to do that). Now I need to deploy this report to prod environment, using powershell script. Since the dataset id in Prod env is different then what is used in my Powerbi report. So is it possible to update the dataset id of my Powerbi report using Powerbi API / REST API or any other means, when I am deploying it to Prod env?

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-yuezhe-msft
Moderator

Re: Deploy powerbi report using powershell with new dataset Id

@rishigarg,

There are two methods for you to change the dataset id.

1. Directly change data source in PBIX file.
1.PNG

2. Copy PBIX file to ZIP file, edit Connections file in the ZIP file and rename zip file to PBIX file.  There is a similar thread for your reference. Please note that this method is not supported officially. Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.

 



Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Moderator v-yuezhe-msft
Moderator

Re: Deploy powerbi report using powershell with new dataset Id

@rishigarg,

There are two methods for you to change the dataset id.

1. Directly change data source in PBIX file.
1.PNG

2. Copy PBIX file to ZIP file, edit Connections file in the ZIP file and rename zip file to PBIX file.  There is a similar thread for your reference. Please note that this method is not supported officially. Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.

 



Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rishigarg Frequent Visitor
Frequent Visitor

Re: Deploy powerbi report using powershell with new dataset Id

Thanks, In Connections file, I see there is a JSON tag "PbiServiceModelId": How to get the value for this tag?