Forum Discussion
Developer mode & git for reports with live connection
Looking into the connectionType of the definition.pbir (pbiserviceOnPremLive) you should be connected to a semantic model in the service that is connected to an Analysis Services database (AAS or SQL). Can you confirm that?
Unfortunately Git Integration does not support Analysis Services semantic models (not hosted in Power BI) - https://learn.microsoft.com/en-us/fabric/cicd/git-integration/git-integration-process#general-limitations
Cannot share a concrete timeline, but we are working to support those scenarios before GA.
This is what i see in definition.pbir file for the report.
The semantic model im connected to in Power BI Service has storage mode "Import". The sementic model is not connected to an SSAS or AAS instance.
- D_Lav2 years agoHelper I
Any toughts or ideas around this RuiRomanoMS ?
I dont see a way to implement GIT for Power BI on a large organizational scale if you cant handle the reports connected to a semantic model.
- RuiRomanoMS2 years agoMicrosoft Employee
If you are live connect to a import model the connectionType should not be of type 'pbiserviceonpremlive', should be 'pbiServiceXmlaStyleLive'. If you are live connected to a import model and still seeing 'pbiserviceonpremlive' its a bug. Can you please open a support ticket.
Are you using the latest Power BI Desktop version?
Can you share the connectionString property? You shared before, but I cannot see the datasource value. I dont need the full address just the initial chars "powerbi://api.powerbi.com*" - Anonymous2 years agoNot applicable
RuiRomanoMS , I just tried it.
I opened a pbix file that is connected to a Power BI semantic model in PBI Service.
Saved as PBIP and checked the definition.pbir: "connectionType" is 'pbiServiceXmlaStyleLive'.
Then checked the same report, which I published from the pbix files and synced on my laptop through GIT, and the section for the datasetReference is completely changed:
{
"version": "1.0",
"datasetReference": {
"byPath": {
"path": "../Report name changed.Dataset"
},
"byConnection": null
}
}
Can anyone confirm this behavior?
- RuiRomanoMS2 years agoMicrosoft Employee
That's by design, when both report and semantic model live in the same workspace.
Workspace export to git is not selective, it always exports all items. If you have a report connected to a semantic model in the same workspace, export to Git and clone to your laptop, you will see a folder for both report and semantic model and a byPath connection. And when you open the report for edit in Desktop, make changes and commit, Fabric Git will, resolve the relative byPath connection and ensure its connected to the model in the service. Git integration, only exports with ByConnection when the report is connected to a model in a different workspace.
https://learn.microsoft.com/en-us/power-bi/developer/projects/projects-report#definitionpbir
- Anonymous2 years agoNot applicable
Does this mean that even we don't see the Live connection in the status bar, it is still connected to the model in the Workspace?
This is irritating.
- RuiRomanoMS2 years agoMicrosoft Employee
No, when you open in Desktop and its a byPath it will also load the model from disk and let you edit it if you like. This allows Desktop developers to work in complete isolation without service dependency.
I understand, that if you are working with a very large model this could be inconvenient, because you are forced to at least once refresh the model locally. As a workaround, you can:- Edit the definition.pbir and switch to a "byConnection" (it's on the backlog to provide a UI feature to facilitate this swap)
- Move the semantic model or report to a different workspace
I'm also curious to understand what, in your opinion, should be the right behavior?
- Anonymous2 years agoNot applicable
Thank you for your explanations, RuiRomanoMS
For me, the live connection must remain active without any intervention from the developer.
The Report-"Developer" could be anyone without any knowledge of data modeling, editing JSON files, etc.
Having a report with a live connection switch to a local data model makes no sense. Then, I must edit a JSON file (or change a setting) to switch to the expected behavior.
Why?
Any other opinions on this, guys?
- RuiRomanoMS2 years agoMicrosoft Employee
Thanks for the feedback.
A few follow ups:
- Why those report developers need to go to Desktop and dont edit/develop the reports in the service?- Are those report developers confortable enough with the git concepts: cloning, merge, commit, push? If not, the download PBIX & upload/publish may be a better and simpler alternative.
- If we always export the report with a connection to the model in the workspace, let's say you have 1 model and 2 reports, what would be your expectation if you sync that git branch to a new empty workpace? It creates the model and the 2 reports connected to the previous workspace?
>> Having a report with a live connection switch to a local data model makes no sense
The report does not switch to a local mode. Contrary to PBIX, in PBIP the report is completely separated from the model (they are two distinct folders). When you publish back to the service, using Git, the relative/local connection is resolved to a service connection.
>> Then, I must edit a JSON file (or change a setting) to switch to the expected behavior.
I agree, it should not require a JSON file edit, in the future we want to have a simple UI for this.
- Anonymous2 years agoNot applicable
So, why do we need Git and version control when part of the solution is outside of Git?
It is easy to explain, even to non-technical-"developers", the concepts of Version control.
So, yes. They should work with Git and sync their work through it with the Workspace.