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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors