Forum Discussion
Deploying Dacpac to Existing Data Warehouse
Hi davidwolfson with dacpacs (as you know) it's not possible to alter a table other than to add a new column.
What I do is I have a process in SQL to write out the new table amended schema eg if I have DimProduct, then I write out to DimProduct_New. Then I rename the objects (switching them over using sp_rename). If there are PK/FKs then they will need to be dropped recreated after the table rename.
What I then do is keep the latest schema in a database project in Azure Data Studio in GitHub by doing a schema compare and bringing the latest changes into the project. So I don't deploy from the project, it's just there to make sure I have a full copy of the schema.
I'm returning to my testing with Deployment Pipelines, but there is still the issue of changing the schema other than adding new columns.
- davidwolfson1 year agoFrequent Visitor
Can you provide some more details on your process in SQL? Also, with the database project, do you compare the "old" schema with the schema that is the result of the SQL process?
- Anonymous1 year agoNot applicable
HI davidwolfson,
AFAIK, current some SQL functions (e.g. ALTER TABLE) not released to data warehouse and been listed in the limitations.
If you want to use these feautre on data warehouse, you can pay attention on the new features release or try to submit an idea about these requirements.Microsoft Fabric Ideas
If you interested about that document, you could take a look at the following link to know more about these:T-SQL surface area - Microsoft Fabric | Microsoft Learn
Regards,Xiaoxin Sheng