Forum Discussion
Script out all Fabric Datawarehouse objects
- 6 months ago
Hi AJAJ,
For Pipelines, I'd recommend connecting your workspace to Git to back them up.
For Warehouses, I believe if you commit those to Git as well it will make a database project that contains the DDL for all tables/views. This is in preview however.
Source Control with Fabric Data Warehouse (Preview) - Microsoft Fabric | Microsoft Learn
- 6 months ago
Hi AJAJ
You will need Visual Studio Code with two extensions, both extensions are from Microsoft.
1. SQL Server (mssql)
2. SQL Database Projects
Once installed, go to SQL Server extension page from the left menu and add a new connection to your Fabric workspace. Select Browse Fabric to pick your Fabric SQL Data Warehouse or Database. When connected you should see all databases on the left in the Databases node. Right click on the Database you'd like to script and select Create Project from Database menu. You'll be asked to select a folder. Select File Type when asked for folder structure and recommended options for everything else.
You will now have one file containing the script for all objects.
Hi AJAJ
You will need Visual Studio Code with two extensions, both extensions are from Microsoft.
1. SQL Server (mssql)
2. SQL Database Projects
Once installed, go to SQL Server extension page from the left menu and add a new connection to your Fabric workspace. Select Browse Fabric to pick your Fabric SQL Data Warehouse or Database. When connected you should see all databases on the left in the Databases node. Right click on the Database you'd like to script and select Create Project from Database menu. You'll be asked to select a folder. Select File Type when asked for folder structure and recommended options for everything else.
You will now have one file containing the script for all objects.
Thanks deborshi_nag . Im using fabric warehouse and not SQL DB. Does the above work for fabric datalake and warehouse (not SQL db)?
- deborshi_nag6 months agoSuper User
Yes, it works for Fabric Datawarehouse and Fabric SQL Database.