This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Author: Deepak Gundavaram
In today's rapidly evolving digital and AI landscape, Microsoft Fabric plays a crucial role in managing and automating data integration and analytics processes. As a comprehensive data platform, Fabric offers robust CI/CD capabilities, particularly for data pipelines. These capabilities enable efficient tracking of changes, seamless collaboration, and easy reversion to previous states through Git. Continuous integration and continuous deployment frameworks further streamline code integration and deployment, minimizing human error and accelerating the delivery of updates and new features. Below is the list of currently supported CI/CD Artifacts:
While Fabric supports CI/CD for a broad spectrum of artifacts, our primary focus for this introductory post will remain on data pipelines. As the capabilities within Microsoft Fabric are continuously updated, staying informed through regular consultation of the official documentation is advisable. This is just the beginning, and future posts will delve into additional deployment patterns and advanced techniques.
To use Microsoft Fabric’s CI/CD features, setting up an Azure DevOps project and a Git repository is essential. GitHub support was recently added, but that is a topic for another day. Here are some general steps to get started:
Exploring_CI_CD_Capabilities_in_Microsoft_Fabric_A_Focus_on_Data_Pipelines
These steps will set up the basic infrastructure required for managing and deploying code changes using Microsoft Fabric's deployment pipelines.
Navigate to the admin portal within Microsoft Fabric and click on Tenant settings. Look for the Git Integration and enable “Users can synchronize items with the Git repositories (preview)” setting.
Exploring_CI_CD_Capabilities_in_Microsoft_Fabric_A_Focus_on_Data_Pipelines
Git is a distributed version control system that enhances collaborative software development by managing code changes:
Continuous Integration (CI) and Continuous Deployment (CD) are practices that automate software delivery:
To follow the steps in the following sections, it is recommended to set up the following workspaces in Microsoft Fabric:
The Fabric CI/CD platform optimizes continuous integration and deployment by integrating seamlessly with Microsoft Fabric. Below is a table outlining its key features:
|
Features |
Functionality |
|
Git Integration |
Facilitates efficient version control and collaborative workflows for distributed teams. |
|
Deployment Pipelines |
Automates transition from development to production with consistent, reliable deployments. |
|
Fabric REST APIs |
Enables automation and integration, allowing developers to programmatically manage and customize CI/CD processes. |
Initial Setup:
Development Cycle:
Review and Integrate:
Deployment via Fabric Deployment Pipelines:
Fabric CICD Process Flow
Exploring_CI_CD_Capabilities_in_Microsoft_Fabric_A_Focus_on_Data_Pipelines
Description automatically generated" class="wp-image-13205"/>
Automated deployment process:
Only feature and dev workspaces are connected to Git, while the stage and prod workspaces are updated via Fabric deployment pipelines, not Azure DevOps pipelines.
This streamlined process ensures efficient development, testing, and deployment, leveraging robust integration and automation capabilities provided by Microsoft Fabric.
Building on our discussion of the theoretical frameworks of CI/CD with Azure DevOps and Microsoft Fabric, we now move to a step-by-step guide. This section is designed to practically demonstrate the setup and operation of CI/CD processes. Follow along to see how these concepts are applied in real-world scenarios.
To integrate the Azure DevOps Repo’s main branch with Fabric Dev Workspace, we would have to navigate the appropriate workspace within Fabric and then to workspace settings. Once there click on GIT integration and provide the details to connect to the repo. Click the connect and sync button.
A_screenshot_of_a_computer
Once we do, the workspace gets synced with the Repo. As we do not have the artifacts in the repo or the workspace, there are no synced fabric artifacts in either direction.
When a development team starts working on a new feature, it is recommended to create a feature branch based off the main branch and integrate it with a feature workspace in Microsoft Fabric. This can be easily achieved by navigating to the workspace settings of the feature workspace.
A_screenshot_of_a_computer
Exploring_CI_CD_Capabilities_in_Microsoft_Fabric_A_Focus_on_Data_Pipelines
Description automatically generated" class="wp-image-13208"/>
All the artifacts which are developed by the developer would be committed to this feature branch and once the development is complete the pull request within Azure DevOps and associated approval process will be leveraged to merge the feature branch code base into main branch.
Now let’s create a simple Data Pipeline with a Wait activity and save the data pipeline.
Exploring_CI_CD_Capabilities_in_Microsoft_Fabric_A_Focus_on_Data_Pipelines
Description automatically generated" class="wp-image-13209"/>
When we navigate back to workspace, you will notice that source control indicates that there are changes that need to be committed. To do so, click on the Source control icon and it will bring up the source control pane and we will be commiting the changes, i.e. the newly developed data pipeline into the feature branch.
A_screenshot_of_a_computer
A_screenshot_of_a_computer
Once we commit, if we navigate back to the workspace, we can see that the Git status of the data pipeline artifact has changed from uncommitted to Synced.
A_screenshot_of_a_computer
In order for us to submit a pull request, we need to navigate to the Source control pane and then click on View repository.
A_screenshot_of_a_computer
A_screenshot_of_a_computer
During this process, we can add review processes by adding required reviewers and set up default reviewers based on the Azure DevOps policies.
A_screenshot_of_a_computer
A_screenshot_of_a_computer
A_screenshot_of_a_computer
Once we are done with the Merge process, we will see artifacts added to the main branch.
A_screenshot_of_a_computer
Now, let's navigate to the Dev workspace created in the first step. Since the Dev workspace is integrated with the main branch, the source control icon in the workspace should indicate that there are updates in the main branch. We will now update the workspace with incoming changes using the UI. Note that this can also be achieved using the Fabric REST API, and we will provide links on how to leverage the Fabric REST API at the end of the document.
Exploring_CI_CD_Capabilities_in_Microsoft_Fabric_A_Focus_on_Data_Pipelines
Description automatically generated" class="wp-image-13219"/>
Click on Source control and then update all. This will update the workspace with incoming changes.
Before we move to the Deployment pipelines, we would have to create two new workspaces for stage and prod regions.
Stage Workspace:
A_screenshot_of_a_computer
Prod Workspace:
A_screenshot_of_a_computer
For us to create a deployment pipeline, we will first navigate to the Dev workspace and click on create deployment pipeline.
A_screenshot_of_a_computer
Name the deployment pipeline and click next.
A_screenshot_of_a_computer
Based on the number of stages we have, we can customize the stages accordingly. Fabric supports up to 10 workspaces. Here, we are going with three stages.
A_screenshot_of_a_computer
With in the deployment pipeline, we would have to assign workspaces for each of the stages.
A_screenshot_of_a_computer
A_screenshot_of_a_computer
Here are the assigned workspaces
A_screenshot_of_a_computer
Before deploying code from development to staging, the Fabric UI indicates any differences between the two workspaces by displaying an X mark inside a circle. If there are no differences, Fabric displays a check mark. You can click on the compare icon to identify which objects are different.
In this case, it is the newly created data pipeline i.e. Datapipeline1
A_screenshot_of_a_computer
Once we review the changes and are ready to deploy, we click on the "Deploy" button. Additionally, please note that we can cherry-pick which artifacts need to be deployed from dev to stage and from stage to prod if needed.
A_screenshot_of_a_computer
A_screenshot_of_a_computer
In the upper right corner, there is a Deployment History icon that allows us to view the deployment history.
A_screenshot_of_a_computer
Once deployed, we can go into the deployment section and review the deployments we have completed.
A_screenshot_of_a_computer
In a similar way, to move data pipeline artifact from stage to prod, follow the same steps used to deploy from dev to stage.
As mentioned in the introduction, this blog post serves as an introductory guide. Future posts will explore additional deployment patterns for transitioning between workspaces. Stay tuned for more in-depth insights and advanced techniques.
We value your feedback! Please leave a comment or share your thoughts and suggestions to help us improve: Provide Feedback
Currently, there are some limitations in Microsoft Fabric when deploying data pipelines that users should be aware of. These limitations are expected to be addressed in future updates:
Data Pipeline Activities with OAuth Connectors: For MS Teams and Outlook connectors, when deploying to a higher environment, users must manually open each pipeline and sign into each activity, which is a limitation currently.
Data Pipelines Invoking Dataflows: When a data pipeline that invokes a dataflow is promoted, it will still reference the dataflow in the previous workspace, which is incorrect. This behavior occurs because dataflows are not currently supported in deployment pipelines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.