Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe'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
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!
Solved! Go to Solution.
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.
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.
See if this gets you anywhere closer Datasets - Update Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.