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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
BiJoe
Helper II
Helper II

Truncate Warehouse SQL table

I have a working pipeline, pulling data from API, and using a Copy activity to load the data into a SQL table in Warehouse. I would like to truncate the rows before copying, but I can't seem to find the correct manner. I have tried TRUNCATE TABLE <table name> in the pre-copy script inside the copy activity, and a separate Script activity in the pipeline with same query in the "Non-query" script field. Either way I get "TRUNCATE TABLE is not a supported statement type." 

 

What am I missing here?

 

EDIT: A DROP TABLE <table name> statement works in the Script activity. So it's just the TRUNCATE statement not supported yet?

1 ACCEPTED SOLUTION
NandanHegde
Super User
Super User

Hey,

Truncate statement is yet not supported in warehouse for now.

You can use Delete statement/

https://joyfulcraftsmen.com/exploring-limitations-of-fabric-warehouse-3-key-observations/




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com

View solution in original post

3 REPLIES 3
TwinkleCyril
Microsoft Employee
Microsoft Employee

We are working on adding support for TRUNCATE TABLE in Fabric DW and will be available soon. Stay tuned!

TRUNCATE Table is now generally available in Fabric DW. Review TRUNCATE TABLE (Transact-SQL) - SQL Server | Microsoft Learn for further details.

NandanHegde
Super User
Super User

Hey,

Truncate statement is yet not supported in warehouse for now.

You can use Delete statement/

https://joyfulcraftsmen.com/exploring-limitations-of-fabric-warehouse-3-key-observations/




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

November Update

Fabric Monthly Update - November 2024

Check out the November 2024 Fabric update to learn about new features.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.