Skip to content

Share a Microsoft Fabric Data Warehouse Database Project with the new target platform

Reading Time: 5 minutes

In this post I want to cover how you can share a Microsoft Fabric Data Warehouse Database Project with the new target platform.

Which is now possible thanks to the latest Azure Data Studio Insiders update. You can view the ‘Add projects support for Fabric DW‘ pull request in the public azuredatastudio GitHub repository.

For those wondering, you can think the insiders version as a preview of Azure Data Studio. I covered it in a post about using Azure Data Studio Insiders build a few years ago.

Important note number one: Shortly after this post was published the same functionality was released in the GA version of Azure Data Studio.

I covered the fact that the new Microsoft Fabric Data Warehouse Target Platform is now included as part of the latest Azure Data Studio update in a newer post. However, the contents of this post still apply when it comes to sharing the project and deploying the dacpac, so enjoy.

Important note number two: After this post was published SqlPackage was updated. Which means that you can do a pipeline deployment in Azure DevOps now. Which I cover in the below two posts:

Important note number three: After this post was first published Microsoft Fabric became generally available. You can read more about this in detail in the official post by Ryan Majidimehr.

Anyway, the contents of this post still applies so happy reading.

Creating the Microsoft Fabric Data Warehouse Database Project

To show this working, I decided to create a Database Project based on an existing Data Warehouse in this post. So, I created a new one that contains a few objects. As you can see below.

A populated Microsoft Fabric Data Warehouse
Populated Microsoft Fabric Data Warehouse

Next, I went into the latest version of Azure Data Studio insiders. Which has the latest version of the SQL Database Projects extension installed (v1.3.1).

I go to the connections section and setup the connection to the Data Warehouse. Once done I right click the Data Warehouse and select ‘Create Project From Database’ to bring up the wizard.

Create project from database

Once done I have a populated database project.

Data Warehouse Database Project
Data Warehouse Database Project

However, that is not all. If I open up the sqlproj file for it, I can see that the Database Schema Provider (DSP) setting is below.

<DSP>Microsoft.Data.Tools.Schema.Sql.SqlDwUnifiedDatabaseSchemaProvider</DSP>

Which means there is a new target platform. In fact, when I go to manage the database project and select ‘Change Target Platform’ I see two new options towards the bottom. One for serverless SQL Pools and another for Microsoft Fabric Data Warehouses.

New Synapse Data Warehouse in Microsoft Fabric target platform

In this post I focus on the new Microsoft Fabric target platform at the bottom.

Anyway, one interesting observation is that the name of the Database Schema Provider (DSP) shown above within the sqlproj file is different from what is shown in the wizard.

Once that is done, I initialize the repository in the source control section and done an initial commit. Just like I covered in my previous post about Git integration tests for Power BI reports.

I then created a new Git repository in Azure Repos within Azure DevOps.

New Git repository
New Git repository

I then synchronized this repository with my local one. Just like I have covered in previous posts. Once done my repository was ready for use.

Populated Git repository in Azure Repos

I then created another branch to work with called Feature. In addition, I added the below line to the sqlproj file so that it would work with a newer .NET framework.

<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>

Sharing and deploying updates using the Microsoft Fabric Data Warehouse Database Project

You can share this repository for others to work with and deploy to other Data Warehouse. Because if they have the latest Azure Data Studio Insiders update they can deploy the contents of the Database Project to another Microsoft Fabric Data Warehouse.

I tested this by going into the Database Projects in Azure Data Studio Insiders, right clicking the project and selecting ‘Publish’.

Selecting Publish
Selecting Publish

In the ‘Publish Project’ screen I clicked on the service connection icon to connect up to the new Microsoft Fabric Data Warehouse.

Publish Project
Publish Project

Once Azure Data Studio Insiders informed me that the deploy dacpac had succeeded I went back into Microsoft Fabric. Where I could see my new objects.

Deployed items in new Microsoft Fabric Data Warehouse
Deployed items in new Microsoft Fabric Data Warehouse

Just be aware that if you do this two new folders will be created in your repository folder. So, you might want to delete the ‘bin’ and ‘obj’ folders before you synchronize your project with Azure DevOps.

Deploying the Microsoft Fabric Database Project with Azure DevOps

As I mentioned before, after this post was first published SqlPackage was updated.

Which means that you can do a pipeline deployment in Azure DevOps now based on the repository that you synchronize.

I cover this in the below two posts:

Final words

I hope this post on how you can currently share a Microsoft Fabric Data Warehouse Database Project with the new target platform.

It looks like at this moment in time the best option to share a Database Project with the new Target Platform is to share in central repository and use the latest version of Azure Data Studio Insiders for deployments.

At least until other applications like SqlPackage are updated. Which will introduce more interesting CI/CD possibilities.

Of course, if you have any comments or queries about this post feel free to reach out to me.

Published inAzure DevOpsMicrosoft Fabric

7 Comments

  1. […] In fact, I showed these demos before publishing my post this week on how you can share a Microsoft Fabric Data Warehouse Database Project with the new target platform. […]

Leave a Reply

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