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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
edyck
Regular Visitor

Parameterize Semantic Model Data Source URL

Hi all,

 

I've got a Power BI Pipeline configured so that I can change the connection string of some SQL datasources to point to the correct environment, which works great.

 

Now I have a couple of reports that are connected to a published semantic model, and I want to change which workspace the reports look for based on the environment in the Power BI Pipeline, allowing me to automatically switch data sources when running through the pipeline.

 

From what I can see, there's no way in Power BI Desktop to parameterize the URL of the semantic model datasource, so I'm not sure how I could go about acheiving this. 

 

Any ideas or workarounds would be great!

1 ACCEPTED SOLUTION
edyck
Regular Visitor

It looks like there's no way to parameterize a Power BI semantic model URL for a report. What I ended up doing is resaving the pbix files as pbip projects, and then wrote a node script to dynamically change the workspace that the semantic model points to by editing `definition.pbir`. Unfortunately there is no public API for publishing Power BI projects, so I still have to manually open Power BI Desktop to publish them to the correct workspace.

View solution in original post

3 REPLIES 3
edyck
Regular Visitor

It looks like there's no way to parameterize a Power BI semantic model URL for a report. What I ended up doing is resaving the pbix files as pbip projects, and then wrote a node script to dynamically change the workspace that the semantic model points to by editing `definition.pbir`. Unfortunately there is no public API for publishing Power BI projects, so I still have to manually open Power BI Desktop to publish them to the correct workspace.

lbendlin
Super User
Super User

Looking at the data returned by that API call the datasource type is `Extension`, and it returns the details of the underlying connection, which is not what I want. What I'd like is to get back the URL of the Power BI semantic model and change that with the datasource update request, but it looks like this might not be something that's possible.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.