Introduction
Microsoft Fabric is a low friction unified analytics platform that brings together data engineering, data integration, data warehousing, data science, real-time analytics, and business intelligence.
Fabric Warehouse
A Fabric warehouseis a next-generation data warehousing solution.
It is designed to handle large volumes of data and provide fast query performance.
How do you create a Fabric Warehouse?
There are several ways to create a Fabric warehouse, including using the Fabric portal, Fabric CLI, using the Fabric Terraform provider.
What is FabricTools?
We are going to use [FabricTools, a PowerShell module that simplifies the management of Microsoft Fabric resources. You can find it on GitHub at[FabricTools provides functions to create, update, and delete Fabric warehouses and other resources. It has been developed and is maintained by members of the community.
How do you install FabricTools?
To install the FabricTools module from the PowerShell Gallery:
|
|
Create a Fabric Warehouse with PowerShell
First, you need to connect to your Fabric account using the Connect-FabricAccount
cmdlet. This cmdlet will prompt you to sign in with your Microsoft account. I like to use a secret to store my tenant ID, so I can use it in my scripts without hardcoding it. You can use the Get-Secret
cmdlet from the Microsoft.PowerShell.SecretManagement module to retrieve the secret.
|
|
Next, you can create a Fabric warehouse using the New-FabricWarehouse
cmdlet. You need to specify the name of the warehouse, the workspace id that it will be assigned to, and optionally a description.
|
|
This will create a new Fabric warehouse with the specified name and description in the specified workspace.
You can also see it in the Fabric portal in the workspace you specified.
You can also verify that the warehouse has been created by using the Get-FabricWarehouse
function. This will also return the details of the SQL connection string that you can use to connect to the warehouse from other applications like SQL Server Management Studio Visual Studio Code.
|
|
Conclusion
In this post, we learned how to create a Microsoft Fabric warehouse using PowerShell. We used the New-FabricWarehouse
cmdlet to create a warehouse in a specified workspace. This allows you to manage your data warehousing needs effectively within the Microsoft Fabric platform.
You can now use this warehouse to store and analyze your data using the powerful features of Microsoft Fabric.