Microsoft Fabric  

Microsoft Fabric Warehouse Integration in VS Code for Devs

When Microsoft announced Fabric in 2023, data professionals collectively perked up. Finally, a unified analytics platform promising to connect all our data dots. But for many of us who live and breathe in code editors rather than web interfaces, there was still something missing—until now.

The VS Code integration with Fabric Warehouse isn't just another checkbox feature; it's transforming how developers interact with enterprise data. After spending several weeks putting this integration through its paces, I'm convinced it's a game-changer for anyone who values both power and flexibility.

Breaking Down the Walls Between Development and Data

With the VS Code extension for Fabric, you can.

  • Write, test, and debug SQL queries directly in your favorite editor
  • Access Fabric Warehouse objects through a familiar tree view
  • Execute queries and view results without leaving your coding environment
  • Version control your SQL scripts alongside application code

For someone like me who spends most of my day in VS Code anyway, this integration means I can stay in my productivity zone while working with enterprise data.

Setting It Up (Easier Than You Think)

Getting started is remarkably straightforward. In my example, I have a Fabric Warehouse named PROD_SALES_WH, which contains Sales as a table, as seen below.

 Fabric Warehouse

It is important to have VS Studio Code editor installed on your laptop. I have already done. We can easily open the Fabric Warehouse from the UI of the Warehouse. To do that, click on Open in and then select Visual Studio Code from the dropdown.

Visual Studio

In the intermediate window, we can see the Server Name and the Database Name, which we can use in VS Code to authenticate and connect. To make it easier, we will just click on Open in VS Code.

 Server Name

This is going to immediately prompt me to allow SQL Server (mssql) extention to open this URI, as seen below.

SQL Server

I am going to select Open. In the Connect to Database tab in the CS Code, I am going to provide Profile Name and Azure Account (email that is associated with my Microsoft Fabric account). The Server name, Database Name, and Authentication type are automatically populated. Then, I will click on Sign in to fully authenticate to my Fabric Warehouse.

Connect to Database

Then, click Connect. As we can see from the screenshot below, we are able to successfully connect to our Fabric Warehouse and we can see the fSales table as well as the data in it when queried.

Connection

This is really cool and highly intuitive to work with compared with the UI of the Fabric Warehouse.

Aside from running queries against the Fabric Warehouse, we can also create tables, insert records into the tables, and much more. Next, I created a table named employees_data with some columns. When executed, I can see that the table is successfully created, as seen below.

Cornerstone

Next, I want to add some data into the columns of the table. For that, I will be using the insert statement and immediately querying the table again as seen below.

Insert statement

This is cool. Next, I want to check this out in the Fabric Warehouse portal to see if the table is there or not. From the screenshot below, we can see the employees_data table.

Data table

Should You Make the Switch?

If you're already a VS Code user and working with Microsoft Fabric, this isn't even a question—set it up today. The productivity gains are immediate.

If you're on the fence about Fabric itself, the strong tooling integration might be one more reason to give it serious consideration, especially if your organization is already in the Microsoft ecosystem.