Forum Discussion
ALTER TABLE DW
Hi smpa01 currently you can only add new columns to an existing table. This is because MS are using an older version of the Delta Lake read/write protocol. There's no info yet when further support for ALTER TABLE will be supported.
I have more info in this blog https://www.serverlesssql.com/the-reality-of-alter-table-in-fabric-warehouses-2/
This is simply not practical.
MS must inform this community when can we expect this to happen?
Till it happens what are the alternatives?
Theses gotchas keep on preventing any serious data-engineering in Fabric.
It is simply not possible to simply DELETE a table with valuable data to alter a single column type, imagine the nightmare of the fabric developer if this sort of req keeps coming frequently from business every now and then. How do I deal with it in absence of ALTER?
- AndyDDC2 years ago
Most Valuable Professional
At the moment you would need to write the new table out and delete the old table. I do this by writing the new table and then using sp_rename to switch the names of the table. As I said, MS are working from the OSS Delta specification and there is no word yet on when the delta "column mapping" feature will be implemented.
If this feature is on the roadmap then it'll appear here https://learn.microsoft.com/en-gb/fabric/release-plan/data-warehouse
-------------------------------
If my answer has been useful please provide kudos and mark as the solution.