{"id":1022,"date":"2021-08-21T14:35:40","date_gmt":"2021-08-21T12:35:40","guid":{"rendered":"https:\/\/www.flip-design.de\/?p=1022"},"modified":"2021-08-21T14:35:40","modified_gmt":"2021-08-21T12:35:40","slug":"continuous-deployment-of-power-bi-reports-with-azure-devops-part-1-direct-query-and-import-mode","status":"publish","type":"post","link":"https:\/\/www.flip-design.de\/?p=1022","title":{"rendered":"Continuous Deployment of Power BI Reports with Azure DevOps (Part 1, Direct Query and Import Mode)"},"content":{"rendered":"\n<p>In an Enterprise Environment the Power BI Report development and deployment is a little bit different. The reports will mostly not create by business users and self-deployed. The reports will be developed by IT Professionals with depending data sources like SQL Server, Analysis Services and so on. So, this Blog post will cover the deployment with Azure DevOps and data sources which are connected by Direct Query and\/or the Import Mode. This post handles a scenario without using Premium or Premium per user. So, I don\u2019t use deployment pipelines of Power BI.<\/p>\n\n\n\n<p>To begin, I\u2019ve created a new repository for saving and organize my Power BI reports.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image.png\"><img decoding=\"async\" loading=\"lazy\" width=\"475\" height=\"292\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image.png\" alt=\"\" class=\"wp-image-1023\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image.png 475w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-300x184.png 300w\" sizes=\"(max-width: 475px) 100vw, 475px\" \/><\/a><\/figure>\n\n\n\n<p>Next, I have cloned this repo to Visual Studio and added a blank solution and added my PBIX file to it and published the new files to DevOps.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-1.png\"><img decoding=\"async\" loading=\"lazy\" width=\"337\" height=\"205\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-1.png\" alt=\"\" class=\"wp-image-1024\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-1.png 337w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-1-300x182.png 300w\" sizes=\"(max-width: 337px) 100vw, 337px\" \/><\/a><\/figure>\n\n\n\n<p>At the Web portal of DevOps you will find the new project and the Power BI file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-2.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"286\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-2.png\" alt=\"\" class=\"wp-image-1025\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-2.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-2-300x142.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-2-500x236.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>The PBIX file contains a parameter for the data source, and it is used by the Query. The result of this query is only the server name. Again, in an enterprise environment you have not only one data source. Mostly you have different stages like Development, Integration\/Testing and a Productive Environment.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-3.png\"><img decoding=\"async\" loading=\"lazy\" width=\"599\" height=\"649\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-3.png\" alt=\"\" class=\"wp-image-1026\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-3.png 599w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-3-277x300.png 277w\" sizes=\"(max-width: 599px) 100vw, 599px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-4.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"368\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-4.png\" alt=\"\" class=\"wp-image-1027\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-4.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-4-300x182.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-4-493x300.png 493w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>So, if you change the server name the report will automatically connect to the new data source and display in this case the actual server name.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-5.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"364\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-5.png\" alt=\"\" class=\"wp-image-1028\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-5.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-5-300x180.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-5-500x300.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>I have also created a new, blank workspace at the Power BI portal and now, we need to publish the report with DevOps to this workspace.<br>Now I created a new Release Pipeline (using the blank template):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-6.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"330\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-6.png\" alt=\"\" class=\"wp-image-1029\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-6.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-6-300x164.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-6-500x273.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>Next, we need an artifact. This is our Power BI file. I selected my new repo, the project and the PBIX.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-7.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"330\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-7.png\" alt=\"\" class=\"wp-image-1030\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-7.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-7-300x164.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-7-500x273.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>For the next step we need a step\/task inside out stage to deploy the report to the newly created workspace. Here I have added the Task template from the store \u201cPower BI report Tasks\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-8.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"330\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-8.png\" alt=\"\" class=\"wp-image-1031\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-8.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-8-300x164.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-8-500x273.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>To configure this task, we need a valid connection with a Pro license. You need also to configure the new workspace name where \u00a0the report should be deployed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-9.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"330\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-9.png\" alt=\"\" class=\"wp-image-1032\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-9.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-9-300x164.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-9-500x273.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>After saving and creating a new release of this pipeline the report should be deployed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-10.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"330\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-10.png\" alt=\"\" class=\"wp-image-1033\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-10.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-10-300x164.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-10-500x273.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>After the deployment is succeed you will find the artifact\/the PBIX at the workspace.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-11.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"330\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-11.png\" alt=\"\" class=\"wp-image-1034\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-11.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-11-300x164.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-11-500x273.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>But the connection is the same as before. So, we need to add a new task to our pipeline:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-12.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"357\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-12.png\" alt=\"\" class=\"wp-image-1035\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-12.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-12-300x177.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-12-500x295.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>Here we need to change the action to modify our parameter and we need a small JSON script<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    {\r\n      \"name\": \"server\",\r\n      \"newValue\": \"sql090219.database.windows.net\"\r\n    }\r\n<\/code><\/pre>\n\n\n\n<p>After running the pipeline again, the report would be overwritten, and the connection will be changed because our parameter has received a new value.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-13.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"330\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-13.png\" alt=\"\" class=\"wp-image-1036\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-13.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-13-300x164.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/08\/image-13-500x273.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>The next blog post will be dedicated by changing the source for a live connection and using a Premium capacity with deployment pipelines.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In an Enterprise Environment the Power BI Report development and deployment is a little bit different. The reports will mostly not create by business users and self-deployed. The reports will be developed by IT Professionals with depending data sources like &hellip; <a href=\"https:\/\/www.flip-design.de\/?p=1022\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1022"}],"collection":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1022"}],"version-history":[{"count":1,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1022\/revisions"}],"predecessor-version":[{"id":1037,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1022\/revisions\/1037"}],"wp:attachment":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}