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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Developer mode & git for reports with live connection

Hello!

I currently have two reports that share the same dataset published, hence are connected to that dataset via live connection

 

I want to start using version control for this reports and that includes for example any metrics created at the dataset level but i'm not sure what are the best practices right now.

 

In the future I want to have everything being automated via deployment pipelines as well

 

So my questions is, has anyone tried the developer mode with live connection and if yes what best practices or setup do you recommend?

 

 

24 REPLIES 24
D_Lav
Helper I
Helper I

Hi @RuiRomanoMS 

 

Maby im missing somethhing but i dont understand how this could be by design. If the architecture suggests to separate workspaces for semantic models and reports. You could never use GIT integration for the report part as it is now? 

 

Is there a workaround for this or should we live with the fact that reports connected to a semantic model in a separate workspace can´t be git connected? 

When reports and semantic models live in different workspace there is no problem, the byConnection will be preserved when exporting to Git.
Only when both report and semantic live in the same workspace, when exporting to git because they are in the same workspace the definiton.pbir of the report will be by default as a relative byPath connection.

Thanks @RuiRomanoMS for the reply.

 

Maby its a separate error then.. I have created a simple report connected to a semantic model in development stage and then, save it as a PBIP, push it to development branch in origin and try to sync the branch in my report workspace i get the following error. 

D_Lav_0-1713419348675.png

 

I have used the connect to PBI Semantic model connector. 

its only a small table in the report. 

The definition file does indeed validate what you said so i guess that looks good?

D_Lav_1-1713419703187.png

 



Are you connecting to a semantic model in "My Workspace"? Or to Azure/SQL Analysis Services?

Hi @RuiRomanoMS 

 

im connecting to a semantic model in a power bi service workspace (App workspace and not in my personal workspace) which is on a premium capacity if that helps. Using connector "Power BI Datasets" 

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-limita... 

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_Lav_0-1713764443391.png

 

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.

 

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*"

Anonymous
Not 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?

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

Anonymous
Not 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.

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? 

Anonymous
Not 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?

 

 

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.

 

 

Anonymous
Not 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.

Anonymous
Not applicable

Hi @D_Lav 

I didn't check the definition file in such detail.

But I got a different effect.

 

The synced report works without any issues.

But I cannot edit it in Power BI Desktop after syncing it back from Git.

 

Perhaps it's the same cause.

I don't know.

Hi @Anonymous 

 

I tried that now aswell. If i publish the report to the workspace with a connection to a semantic model in separate workspace. I can sync the content to git from workspace but not the other way around. 

 

And the reports dont work in pbi desktop after. So same effect as you. 

 

This seem to wonky to work with in real life..

Anonymous
Not applicable

But it's still a problem that it's impossible to properly work with reports with a Live connection while integrating them in Git.

 

To be honest, I don't care about why.

The fact is that it's a pain.

Maybe worth adding an override option that always uses absolute addressing.

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.