Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
AJAJ
Helper III
Helper III

Script out all Fabric Datawarehouse objects

Hi there,

 

In SQL db, i could script out all the views, sps, tables using the below. 

 

AJAJ_0-1769024559141.png

 

AJAJ_1-1769024572146.png


I know in fabric datawarehouse this is not available. However is there a work-around where I could script out all the objects (even fabric data pipelines) which can act as back up scripts, or moved somewhere else and deployed completely on a new subscription. I mean i'm looking to have scripts as back up,  could save the whole code in a zip file, usb drive, oneline drive, etc and have it portable and moved into a new subscription if things have to be started from scratch under a new business entity name.

 

Thanks

 

 

2 ACCEPTED SOLUTIONS
tayloramy
Super User
Super User

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

 

 





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Proud to be a Super User!





View solution in original post

deborshi_nag
Memorable Member
Memorable Member

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. 

 

I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.

View solution in original post

5 REPLIES 5
deborshi_nag
Memorable Member
Memorable Member

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. 

 

I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.

Thanks @deborshi_nag . Im using fabric warehouse and not SQL DB. Does the above work for fabric datalake and warehouse (not SQL db)?

Yes, it works for Fabric Datawarehouse and Fabric SQL Database. 

I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.
AJAJ
Helper III
Helper III

@tayloramy Got it. So its all via Github repo. Thanks. How about if i need to script out data from a bunch of small tables? Something like config table may with 100-200 records? and if there are 20-25 tables. Ofcourse i have to export one by one or if there is any script.

tayloramy
Super User
Super User

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

 

 





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Proud to be a Super User!





Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Free Fabric Certifications

Free Fabric Certifications

Get Fabric certified for free! Don't miss your chance.

January Fabric Update Carousel

Fabric Monthly Update - January 2026

Check out the January 2026 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.