Forum Discussion
ALTER TABLE DW
At the moment, this is a current limitation of Microsoft Fabric Data Warehouse.
ALTER TABLE ... ALTER COLUMN (such as changing a column's data type) is not supported in Fabric Warehouse. However, adding a new column using ALTER TABLE ... ADD is supported.
If you need to change a column's data type, the typical workaround is to:
Create a new table with the desired schema.
Copy the data from the existing table (using CAST/CONVERT where necessary).
Validate the data.
Rename or replace the original table, if appropriate.
While this isn't as convenient as a direct ALTER COLUMN, it's currently the recommended approach for schema changes that modify existing column definitions.
Microsoft has been steadily expanding the T-SQL surface area in Fabric Warehouse, so support for additional DDL operations may be added in future releases. It's worth keeping an eye on the release notes and Fabric roadmap for updates.
For more information:
Fabric Data Warehouse T-SQL surface area: https://learn.microsoft.com/fabric/data-warehouse/tsql-surface-area
Microsoft Fabric roadmap: https://roadmap.fabric.microsoft.com/
If this answers your question, please consider accepting it as the solution so it can help others facing the same limitation. If you found it helpful, a Kudos would also be appreciated!