Microsoft Fabric – Deploying Pipelines With Data Warehouse Connections

Data Fabric

A best practice in any platform is to get CICD or some method of deployment up and running at the start of a project. This will save a lot of time and minimise errors as you progress.

Microsoft Fabric currently has two tools to assist with deployments

  • Git Integration
  • Deployment Pipelines

Both have features that are still in preview – not every scenario is supported and I recently came across a scenario where I had to do some digging to find a workaround.

The Scenario – Deploying Warehouses between Workspaces

In previous builds in Azure, I would typically setup individual environments in their own resource groups, where each resource group would have its own services that provided connection information. In the world of Fabric, these ‘environments’ are now typically workspaces (unless you are lucky enough to have the budget for a capacity per environment).

Connections are now shared per capacity and although deploying Warehouses and Pipelines is supported by deployment pipelines, deployment rules for these artefacts are not, so you cannot specify a new connection when moving to a new workspace.

You may expect a scenario like the below, where connection information is separated per workspace.

By default, the designer allows you to select the connection to your Data Warehouse in the DEV workspace. So far so good.

Once deployed however, although each artefact is deployed, the connection still points to the Data Warehouse in DEV. So the actual workflow is as follows.

Investigating the code it looks like the linked service is hardcoded and deployed the same in each stage.

The Workaround

Setting the connection to Dynamic exposes two properties (named Workspace ID and SQL connection string) that relate to the workspaceId and endpoint properties in the template.

From here its a matter of creating two parameters and dynamically setting these values as per the screenshots below.

The workspace id can be found in the address bar of the browser when selecting a workspace.

The sql connection string can be found in the submenu of the Data Warehouse.

Final Thoughts

There are a few suggestions floating around that each pipeline should be recreated manually. This isn’t ideal and until the functionality is released this seems to be a robust workaround and not too different from existing patterns we may be used to coming from Azure Data Factory.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top