头图

image.png

Overview

In enterprise scenarios, BI reporting is more of an IT service than just a reporting tool. In the same way, as I have stated many times before, Power BI is a set of services, not only Power BI Desktop, its development, testing and deployment need to be effectively managed. Therefore, regardless of whether it is based on compliance or collaboration efficiency, it is beneficial for enterprises to implement PBI continuous integration and deployment.

However, there are not many cases where large and small enterprises at home and abroad have successfully implemented PBI CI/CD. Although I cannot fully understand their practices, based on my own experience and understanding, I propose two implementation ideas for readers' reference. .
In the following, I will use flowcharts and some screenshots to help readers understand this idea, but the specific technical operations will not be STEP-BY-STEP here, because there are documents on the official website that you can easily find out by yourself, and some I have previously What has been said in the blog, there is no need to repeat it here.

Scheme A

These two solutions are not just theory, they are practical in practical technical implementation. The first solution (Plan A) is the solution I personally recommend. It uses OneDrive for Business for version control and Power Automate for continuous deployment. The details are as follows:

This solution is suitable for both small and medium-sized organizations with a single development team, or large enterprises with multiple development teams. For the continuous integration part, the practice is to create a shared OneDrive for the development team, under which different folders can be created for use by different PBI project groups, and configured to the workspace for the DEV environment:

In this mode, developers do not need to deploy the report to the workspace, but only need to upload it to OneDrive. The benefits are as follows:

  1. Use OneDrive to host PBI report files in a DEV environment, and any version changes are synchronized with the workspace
  2. Conducive to the management, division of labor, and version collaboration of the PBI development team
  3. Make full use of the version fallback feature of OneDrive itself to easily implement PBI file version control

In addition, readers do not need to worry that the connection and refresh of the PBI dataset to the data source will not be affected in this mode. In addition, since we only need to configure OneDrive for the DEV workspace, we will wait for its subsequent release to UAT or production. After the environment, any version changes in OneDrive will only affect the DEV environment, not UAT and production.

For the continuous deployment part, we can just use Power Automate's OneDrive or Sharepoint triggers, so that we can automatically trigger subsequent workflows whenever a new version is uploaded to OneDrive:

Therefore, in the subsequent part of the workflow, we can call the PBI REST API to operate on the Power BI content, such as implementing the deployment and refreshing the corresponding dataset:

Note: For using Power Automate to call Power BI REST API, you can refer to this article
https://d-bi.gitee.io/pbi-rest-api-supplement/

Option B

Plan B is a little more troublesome. It uses a similar platform such as GitHub or Bitbucket (hereinafter referred to as GitHub) as a hosting platform and version management tool for PBI files, and uses a dedicated CI/CD tool such as Azure DevOps or Jenkins ( The following is collectively referred to as the DevOps platform) for continuous deployment. details as follows:

In this mode, developers push PBI files to GitHub, and build pipelines on the DevOps platform to run specific deployment codes to implement CI/CD. The advantages are as follows:

  1. Ability to leverage the rich CI/CD capabilities of a DevOps platform
  2. Can be managed under the same CI/CD system as other types of development projects in the enterprise
  3. Ability to integrate with other types of CI/CD projects in the enterprise (such as some ETL projects)

However, compared with Plan A, the disadvantage is that GitHub cannot be directly configured to the Power BI workspace, and cannot be synchronized with the DEV environment in real time like Plan A. Therefore, there is an additional link to deploy to DEV; on the other hand, the plan is implemented. To be a little more troublesome. The following figure is a screenshot of the successful deployment of solution B using Jenkins (I did spend a little bit of trouble in the testing process using Jenkins, but the specific steps are not within the scope of this article, if there is a chance, I will explain it separately).

In contrast, the deployment process with Azure DevOps is much smoother. Figures T1 and T2 below are the successful records of my automatic deployment of Power BI using two different methods. In practice, whenever a developer pushes a new version of the PBIX file to GitHub, the DevOps pipeline is automatically triggered, and the PBIX is automatically triggered. Deploy to PBI workspace and complete data refresh.

Summarize

Usually, I prefer the option A model, which is convenient, concise, efficient, and easy to manage. However, if the integration and deployment of PBI needs to comply with the unified deployment specifications under the enterprise-level framework, or needs to be integrated with other projects such as ETL, then Scheme B may be the only choice. In addition, when the IT team actually implements this solution, there are still many aspects to consider, such as error handling, version rollback, dependencies between data sets and data streams, and deployment order. It must be necessary for the team to make corresponding adjustments and improvements according to the actual situation.


Microsoft Most Valuable Professional (MVP)


The Microsoft Most Valuable Professional is a global award given to third-party technology professionals by Microsoft Corporation. For 29 years, technology community leaders around the world have received this award for sharing their expertise and experience in technology communities both online and offline.

MVPs are a carefully selected team of experts who represent the most skilled and intelligent minds, passionate and helpful experts who are deeply invested in the community. MVP is committed to helping others and maximizing the use of Microsoft technologies by Microsoft technical community users by speaking, forum Q&A, creating websites, writing blogs, sharing videos, open source projects, organizing conferences, etc.

For more details, please visit the official website:
https://mvp.microsoft.com/en-us


Long press to identify the QR code and follow Microsoft China MSDN

Click to join Microsoft MVP ~


微软技术栈
423 声望997 粉丝

微软技术生态官方平台。予力众生,成就不凡!微软致力于用技术改变世界,助力企业实现数字化转型。