In Power BI development in Microsoft Fabric, understanding and utilising source control mechanisms is crucial for efficient collaboration and version management. This blog post delves into the essential aspects of source control for Power BI. This blog also includes the recording of my session at Saudi Arabia’s Excel User Group on the 26th of August 2023. The event was organised by Microsoft MVP, Faraz Sheik, where we walked through all the topics discussed in this blog.
Understanding Source Control
At its core, source control is a system that records changes to a file or set of files over time. This lets developers recall specific versions later, ensuring efficient collaboration and error management. It’s particularly vital for development teams, allowing multiple contributors to work on the same codebase without overwriting each other’s work.
For Power BI developers, this means tracking changes made to reports, and data models that are the most crucial components of every Power BI project.
Why Use Source Control in Power BI?
Power BI solutions, traditionally encapsulated in the PBIX or PBIT files, introduce challenges for source control due to their binary format. Both file formats are unsuitable for properly tracking changes, making traditional source control tools less effective.
- PBIX: The default file format containing data models, report definitions, and the data.
- PBIT: Template files that hold the data model and report definitions but without the actual data.
Both file formats are only suitable for versioning; meaning that the source control system can identify changes to the file but cannot specifically determine which parts of the code or component have changed.
Introducing Power BI Project Files (PBIP)
Aside from the traditional PBIX and PBIT formats, there is a new format that was announced in June 2023. The PBIP format enables the saving of Power BI solutions as Power BI Project. It organises reports and model definitions into text-based files arranged within an easily understandable folder structure. This arrangement significantly enhances the efficiency of Power BI development and is a game-changer in Power BI source control.
Generally speaking, utilising source control mechanisms brings the following benefits to the table:
- Collaboration: Facilitates teamwork by allowing multiple developers to work on different components of the same project without conflicts. For example, a data modeller can work on the data model while report writer A changes an existing report at the same time, report writer B modifies a different report.
- Version Tracking: Keeps a history of changes, making it easy to revert to previous versions if necessary.
- Backup and Recovery: Offers a robust mechanism for backing up your work and recovering it in case of loss.
Source Control Options for Power BI Desktop
Power BI developers currently have several options for source control, each with its own features and considerations. Here are some:
- SharePoint: Offers version control but lacks advanced source control features. You can watch this part of the video or read my previous blog here.
- GitHub and Azure DevOps: Provide more robust source control capabilities, allowing for detailed tracking of changes and collaborative development. Watch this part of the video explaining using GitHub as the source control system for Power BI development within Power BI Desktop.
Integrating Microsoft Fabric Workspaces with Azure DevOps
Depending on your licensing plan (Pro, Premium per User, Power BI Premium, or Fabric Capacities), your options for source control in Power BI Service may vary:
- SharePoint Document Library: Basic version control suitable for more straightforward scenarios.
- Azure DevOps: More advanced, offering full source control capabilities, ideal for larger teams and complex projects.
Note
The Deployment Pipelines in Microsoft Fabric is primarily a tool for managing the release process of your Fabric content. While it can identify changes between different stages, it does not provide source control options such as version control, collaboration, and, more importantly, maintaining the history of changes. These source control features are separate from the Deployment Pipelines functionality.
You can watch this chapter of the video, which explains integrating Microsoft Fabric Workspaces with Azure DevOps and showcases source control functionalities with Visual Studio Code (VS Code).
This blog post provides an overview of source control options within Power BI projects, catering to both new and experienced developers in the data analytics domain. For more details, watch the video, which digs deeper into the details.