Reverse Creating the PBIP file from Source Control

Comments 0

Share to social media

On my article about Source Control with GIT, Power BI and Microsoft Fabric, I illustrate how to use the PBIP file format to include Power BI reports and semantic models in a source control process and stablish a SDLC (Software Development Lifecycle) for Power BI.

However, the complete explanation is based on saving the development using PBIP format and inserting into source control.

What happens if we do the opposite?

Linking a Workspace to the Repository

Let’s imagine we already have the report and semantic model published on the Power BI portal. Like on the image below

A screenshot of a computer

Description automatically generated

We link the workspace to a repository, sending the content to the repository.

A screenshot of a computer

Description automatically generated

Finally, we clone the repository to our local machine. Each object in the workspace will have its own folder.

A screenshot of a computer

Description automatically generated

How could we open the report and semantic model again in Power BI Desktop?

 

Creating the PBIP File

When we start from Power BI and generate the repository, no PBIP file is generated. In this scenario, we need to generate the PBIP ourselves.

The PBIP structure is very simple. It always points to a report and it’s the report which points to a dataset.

On our example, a PBIP file for LakehouseLocalDS would be like this:

{
   "version": "1.0",
   "artifacts": [
      {
         "report": {
            "path": "LakehouseLocalDS.Report"
         }
      }
   ],
   "settings": {
      "enableAutoRecovery": true
   }
}

On this example we need 3 PBIP files, but as you may be noticing, they are very simple.

A screenshot of a computer

Description automatically generated

Once we create the PBIPs, we can open them in Power BI Desktop and manage the report and semantic model as usual.

It’s interesting to notice the “.gitignore” file is also missing, but once we open a PBIP and save it, even without changing anything, a “.gitignore” file is created.

We need to push these PBIPs to the repository, so any other developer cloning the repository will have the PBIPs available. The portal will, in fact, ignore these files. It shows the objects based on the folders.

It’s also important to notice that some changes to the report made on the portal may create an incompatibility with Power BI Desktop. The features on the portal and the features on the desktop version aren’t always aligned.

Edit on May 3rd, 2024

Each report folder contains a PBIR file. Power BI can open a PBIR file directly and it has the same effect as opening a PBIP.

The PBIP exists as a matter of organization, to help creating a better understanding of the process. However, it’s needless. You can use the PBIR directly, without creating a PBIP.

In this way, using the process of reverse creating the PBIP is an optional process.

 

Additional Reference

You may would like to watch the video: Fabric Monday 19: Reverse Create the PBIP

Summary

If we start the source control from the workspace instead of the local machine, the PBIP file are not created for you. You need to manually create them in a process I call Reverse Creating the PBIP.

 

About the author

Dennes Torres

See Profile

Dennes Torres is a Data Platform MVP and Software Architect living in Malta who loves SQL Server and software development and has more than 20 years of experience. Dennes can improve Data Platform Architectures and transform data in knowledge. He moved to Malta after more than 10 years leading devSQL PASS Chapter in Rio de Janeiro and now is a member of the leadership team of MMDPUG PASS Chapter in Malta organizing meetings, events, and webcasts about SQL Server. He is an MCT, MCSE in Data Platforms and BI, with more titles in software development. You can get in touch on his blog https://dennestorres.com or at his work https://dtowersoftware.com

Dennes's contributions