Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Conlyn
Advocate I
Advocate I

Unwanted data source created when publishing rdl report

I am using the MicrosoftPowerBIMgmt powershell module to push rdl reports to workspaces. I then want to update the report data source to map to the proper data source that already exists in our on premise data gateway. The issue I am running into is that when I publish the report (or update the data source with the "\Default.UpdateDatasources" API call) it creates a new data source on the Data sources page and the report won't automatically map to the proper data source that has already been created. If I manually delete the newly created one it then finds the one I want it to use automatically.

 

Is there a way for the publish or UpdateDatasources processes to not automatically create the new data source, or to programatically delete those data sources that aren't associated to our data gateway?

2 REPLIES 2
tackytechtom
Super User
Super User

Hi @Conlyn ,

 

I actually had some issues with data sources as well when I labbed with the TOM library. I, however, was only using it towards Power BI datasets, so this one still might be a long shot: Have a look into the following resources:

 

https://www.tackytech.blog/how-to-automate-the-management-of-custom-partitions-for-power-bi-datasets...

https://powerbi.microsoft.com/en-us/blog/using-xmla-endpoints-to-change-data-sources-in-a-power-bi-d...

 

Essentially, it had to do with the alias of the data source. Once again, this one yields for Power BI datasets but it might point you into the right direction anyway. 

 

Curious to see how you will solve it, though! Hopfully, you can keep us posted in here!

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Hi @tackytechtom,

 

Thanks for the reply, but unfortunately there doesn't seem to be (or I can't find) a way to progamatically bind a paginated (.rdl) report to a Gateway Datasource. I tried changing the Datasource Name in my .rdl to match the Gateway Datasource Name, but it still created a new one named {"server":"[servername]","database":"[databasename]"} instead of finding the exising one that matched.

 

-Conlyn

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.