Forum Discussion
Does byPath work with Live Connection report?
I have a PBIP report that is connected to a different semantic model as a live connection report. Based on CICD best practice, I read that I should use the following byPath,
"byPath": {
"path": "../Customer Returns.SemanticModel"
}instead of byConnection.
"byConnection": {
"connectionString": "Data Source=\"powerbi://api.powerbi.com/v1.0/myorg/workspace_dev\";initial catalog=\"ModelName\";integrated security=ClaimsToken;semanticmodelid=xxx"
}I understand the logic, since after CICD, the byConnection will break across different workspace environment.
My question is, has anyone actually got this working? Live connection report, using byPath, that successfully go through CICD process?
When I tried it, it prompt an error saying that there's already an existing Semantic Model with the same name (of course there is), and asks to overwrite it. After I overwrite it, the next time I open it, it still prompt the same error. Also, I can no longer edit the measures that were created in the report (not the semantic model).
Based on this link, it says "The byConnection property would typically be used for LiveConnect scenarios", so it made me doubt if byPath can actually be used for Live connection report.
byPath is for PBIP‑local models, not for pointing at an already‑published one. for live‑connect reports u keep byConnection and just swap workspace/model IDs with deployment rules.
Hi sahabatsuria ,
Thanks for reaching out to Microsoft Fabric Community.
Kagiyama_yutaka is right -- byPath is not meant for cross-workspace live connect scenarios. Keep byConnection in your definition.pbir and use deployment pipeline rules to swap the connection string across your dev/test/prod stages.
On the measure editing issue you ran into -- the docs actually cover this. You can maintain two .pbir files in the same project, one with byPath for opening locally in Desktop when you need to work on report-level measures, and one with byConnection for deployment. That way both sides work without conflicting with each other.
Reference: Power BI Desktop project report folder - Power BI | Microsoft Learn
Hope this helps. Please reach out for further assistance.
Thank you.
4 Replies
- Kagiyama_yutakaResponsive Resident
byPath is for PBIP‑local models, not for pointing at an already‑published one. for live‑connect reports u keep byConnection and just swap workspace/model IDs with deployment rules.
- v-veshwara-msftCommunity Support
Hi sahabatsuria ,
Thanks for reaching out to Microsoft Fabric Community.
Kagiyama_yutaka is right -- byPath is not meant for cross-workspace live connect scenarios. Keep byConnection in your definition.pbir and use deployment pipeline rules to swap the connection string across your dev/test/prod stages.
On the measure editing issue you ran into -- the docs actually cover this. You can maintain two .pbir files in the same project, one with byPath for opening locally in Desktop when you need to work on report-level measures, and one with byConnection for deployment. That way both sides work without conflicting with each other.
Reference: Power BI Desktop project report folder - Power BI | Microsoft Learn
Hope this helps. Please reach out for further assistance.
Thank you. - v-veshwara-msftCommunity Support
Hi sahabatsuria ,
Just wanted to check if the responses provided were helpful. If further assistance is needed, please reach out.
Thank you. - v-veshwara-msftCommunity Support
Hi sahabatsuria ,
We wanted to kindly follow up regarding your query. If you need any further assistance, please reach out.
Thank you.