{"id":99928,"date":"2023-11-29T17:00:00","date_gmt":"2023-11-29T17:00:00","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=99928"},"modified":"2024-09-03T20:15:17","modified_gmt":"2024-09-03T20:15:17","slug":"microsoft-fabric-extended-source-control-features","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/blogs\/microsoft-fabric-extended-source-control-features\/","title":{"rendered":"Microsoft Fabric: Extended Source Control Features"},"content":{"rendered":"<p>The source control features in <strong>Microsoft Fabric<\/strong> are evolving every day.<\/p>\n<p>The PBIP feature included in Power BI allowed us to include source control on a SDLC process for Power BI, supporting reports and datasets linked directly from the portal to a repository.<\/p>\n<h2>The New Source Control Features<\/h2>\n<p>Recently, without much news, Microsoft extended the source control to support <strong>Notebooks<\/strong>, <strong>Lakehouses<\/strong> and the default dataset for the lakehouses.<\/p>\n<p>The first detail we may notice is the change on the Git Status column on a Power BI workspace.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"995\" height=\"501\" class=\"wp-image-99929\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/a-screenshot-of-a-computer-description-automatica-32.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<p>The Lakehouse and the Notebook appear with the <em>uncommitted<\/em>, meaning the source control supports them, but they are not inserted there yet.<\/p>\n<h2>Adding the New Objects to the Source Control Repository<\/h2>\n<p>\nThe source control button will show the number of uncommitted objects we have. The image below is only an example.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"182\" height=\"41\" class=\"wp-image-99930\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/word-image-99928-2.png\" \/><\/p>\n<p>Once we click the button, the <strong>Source Control<\/strong> window will show the objects we can commit to the repository: the lakehouse and notebook. We only need to click the <strong>Commit<\/strong> button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"349\" height=\"751\" class=\"wp-image-99931\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/a-screenshot-of-a-computer-description-automatica-33.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"349\" height=\"751\" class=\"wp-image-99932\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/a-screenshot-of-a-computer-description-automatica-34.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<p>The status of the objects will be changed to <em>Synced<\/em>, like on the images below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"586\" height=\"459\" class=\"wp-image-99933\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/a-screenshot-of-a-computer-description-automatica-35.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<h2>The objects on DevOps<\/h2>\n<p>Let\u2019s take one more step and look at the objects on Azure DevOps.<\/p>\n<p>One folder will be created for each notebook and each lakehouse.\u00a0The image below shows how the folders look like.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"290\" height=\"339\" class=\"wp-image-99934\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/a-screenshot-of-a-computer-description-automatica-36.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<p>Both folders contain the files <em>item.config.json<\/em> and <em>item.metadata.json<\/em> . <strong>Power BI<\/strong> uses these two files to identify the folder as a single object in its environment.<\/p>\n<p>The notebook is stored as a <em>.py<\/em> file. This may be a surprise, you may expect the format <em>.ipynb<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"279\" height=\"148\" class=\"wp-image-99935\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/a-screenshot-of-a-computer-description-automatica-37.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<p>The <em>.py<\/em> file contains metadata with the information about each code block in the notebook. In this way, <strong>Power BI<\/strong> can reconstruct all code blocks exactly as they were from the content of the <em>.py<\/em> file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"888\" height=\"731\" class=\"wp-image-99936\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/a-screenshot-of-a-computer-description-automatica-38.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<h2>The SQL Endpoint Dylema<\/h2>\n<p>Every lakehouse has a SQL Endpoint. The SQL Endpoint is not supported yet on the Source Control, as you may notice on the image below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"666\" height=\"515\" class=\"wp-image-99937\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/a-screenshot-of-a-computer-description-automatica-39.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<p><strong>Power BI<\/strong> allows us to change the current branch of the workspace using <em>Workspace Settings -&gt; GIT Integration<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"744\" class=\"wp-image-99938\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/a-screenshot-of-a-computer-description-automatica-40.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<p>However, if you try to change the branch to a branch where the lakehouse is not present, you will receive an error. This happens because the <strong>SQL Endpoint<\/strong> is not affected by the branch change and it would always be present, but you can\u2019t break the relationship between the <strong>SQL Endpoint<\/strong> and the lakehouse.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"703\" height=\"372\" class=\"wp-image-99939\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/a-screenshot-of-a-computer-description-automatica-41.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<p>The result: Once the lakehouse is inserted into the repository, it\u2019s not possible to change to a different existing branch. Changing to any branch without the lakehouse will result on the above error.<\/p>\n<p>Creating a new branch from the current one, on the other hand, is still possible. This happens because the lakehouse and <strong>SQL Endpoint<\/strong> will continue to be together.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"398\" height=\"293\" class=\"wp-image-99940\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2023\/11\/a-screenshot-of-a-checkout-branch-description-aut.png\" alt=\"A screenshot of a checkout branch\n\nDescription automatically generated\" \/><\/p>\n<h2>Summary<\/h2>\n<p>It\u2019s great to see the source control in Microsoft Fabric evolving. It still has a long way to go. Meanwhile, it created a new limitation. But we are getting there.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The source control features in Microsoft Fabric are evolving every day. The PBIP feature included in Power BI allowed us to include source control on a SDLC process for Power BI, supporting reports and datasets linked directly from the portal to a repository. The New Source Control Features Recently, without much news, Microsoft extended the&#8230;&hellip;<\/p>\n","protected":false},"author":50808,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2,159164,159166],"tags":[136300,4963,158997,101611],"coauthors":[6810],"class_list":["post-99928","post","type-post","status-publish","format-standard","hentry","category-blogs","category-microsoft-fabric","category-powerbi","tag-azure-devops","tag-git","tag-microsoft-fabric","tag-power-bi"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/99928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/50808"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=99928"}],"version-history":[{"count":1,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/99928\/revisions"}],"predecessor-version":[{"id":99943,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/99928\/revisions\/99943"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=99928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=99928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=99928"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=99928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}