The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
User | Count |
---|---|
43 | |
15 | |
12 | |
11 | |
8 |
User | Count |
---|---|
51 | |
31 | |
20 | |
18 | |
15 |