In this writing, I want to share how I like to set up the Power BI Version Control process with Git Integration configured in workspaces together with building Deployment Pipeline.
Here, because I will configure Git Integration, I will use PBIP file, not PBIX file.
I still need to learn a lot more about what might be the best practice to set up Power BI Version Control with Git Integration and Deployment pipeline, but I like to share what I have learned so far and I am willing to ask for advice on how can I improve.
What I learned so far about the advantage of setting up Git Integration in Power BI Workspace are,
easy version control
one truth of source files in Azure DevOps
collaboration of work with the team under one PBIP file
After reading this blog post, if you have any suggestions or advice, please feel free to comment on Linkedin.
I will try to describe how I want to version control with a sample scenario. This scenario is from one of the recent Youtube videos explaining how the source control and version control look like if it is together with Git Integration. And on top of this, I add my actual situation, but of course, I got the initial idea from the video.
My scenario is, I want to set up version control with Git Integration configured and also I like to create a deployment pipeline in Power BI Service as well. Once reports and datasets are published to the Dev pipeline, reports and datasets are deployed to the Test pipeline and Production pipeline.
Later, there is a request to add two more visualizations to the report. During the progress of the job to add two visuals, there is an urgent request to add a label in the same report's visualization, and immediately publish & deploy it to Dev -> Test -> Prod pipeline. And later, two visuals will be added.
In this scenario, the very first step is, of course, creating a pipeline like below.
Go to Azure DevOps, and create main branch. Next, create a test pipeline branch and a dev pipeline branch. test_pipeline branch is based on the main branch, and dev_pipeline branch is based on test_pipeline branch.
Clone dev_pipeline in VS Code.
Save as pbip file, and then commit -> synchronize with Azure DevOps.
Go to the dev pipeline workspace, and configure Git Integration.
Once Git Integration is done in dev pipeline, the dataset and the report will show up.
And then, deploy it to the test pipeline. In the report in the dev pipeline, only three customers are shown. And once it is deployed to the test pipeline, I changed a parameter to show all customers. Changing parameters when deploying from dev to test, or from test to prod helps developers to fix datasets and reports easily on file by only seeing less amount of rows.
In the test pipeline, set up Git Integration with test_pipeline branch in Azure DevOps. Once the test pipeline is properly configured, Azure DevOps shows like below. For your information, the report in the test pipeline shows 9 customers.
Also, the same process needs to be done in the prod pipeline. In Azure DevOps, main branch shows like below.
Here comes the new request and that is adding two visuals to the current report.
Create two visualizations like the one below, and save the pbip file. And then, create a new branch (Adding-two-visuals).
And then commit.
I did not synchronize it to show changes in Azure DevOps, and in the dev pipeline in Power BI Service. Because it is still under discussion how to add those two.
Suddenly, there is an urgent request that I need to add labels and total labels in the current visualization.
Go to dev_branch.
After I go to dev_branch in VS Code, and when I open the pbip file, it shows before I start to create two visuals. This makes it so convenient to process each request or each project separately in a separate branch. I add labels in the visualization, and then, commit and synchronize dev_branch.
dev_branch in Azure DevOps shows like below, and after updating Dev Pipeline in Power BI Service, it shows like below. It only shows the fixing of the current report (add labels and total labels to the current column chart), and it does not show the two visualizations that are currently working on under a different branch.
Deploy it from the dev pipeline to the test pipeline, and then from the test pipeline to the production pipeline.
Test and Production pipelines have to be updated to influence the changes on Azure DevOps.
In Azure DevOps, test_branch and main branch show like below. When clicking the last step of each branch, the changes are described.
Now, it is time to finalize the job that is adding two new visuals.
In Visual Studio Code, change the branch name to "Adding-two-visuals". And when I open the PBIP file, I can magically go back to the last step of my job which is without the labels and total labels in the current column chart.
The final step of this fixing job is adding labels to the newly created bar chart, and then commit/synchronize.
In Azure DevOps, I can see the new branch (Adding-two-visuals) created like below. I click "Create a pull request" to merge this branch into the existing one, which is dev_branch.
Now, two branches are merged.
And then, after I update the Dev Pipeline, it shows all changes.
Now, in Dev Pipeline, only three customers are shown, and in order to show all customers, the final step is to deploy it to Test and Production and then Update the Test and Production pipelines to make the Azure DevOps test_branch and main branch synchronized.
I am keeping adding some more steps here sooner or later in order to make this version control process more suitable to my work, and if you have any ideas, I love to hear them.
And again, this helps me have,
easy version control
one truth of source files in Azure DevOps
collaboration of work with the team under one PBIP file
I hope this helps to have more fun in version controlling with Git Integration and with Deployment Pipeline in Power BI.
Comentarios