Forum Discussion

DerekBaker's avatar
DerekBaker
Frequent Visitor
2 years ago

Fabric Warehouse Modify schema without dropping and recreating tables

I am wondering the best path for iteratively developing a Fabric Warehouse.  Typically, I am having to add a field on a table and because the ALTER table statement is not currently supported, I must drop and recreate the table.  

 

This article suggests to use a Notebook but that does not apply to a Warehouse it seems: Solved: SQL ALTER command - Microsoft Fabric Community

 

Dropping and recreating is not the end of the world, however, the pain comes when dropping as the semantic model in the Fabric Warehouse will not retain the relationships.  So, when I recreate the table, I also have to go back to recreate the relationships.  

 

Thoughts?  Would using SQL Database Project be the better mechanism?

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi DerekBaker 

    Thanks for using Fabric Community.

    Unfortunately, retaining relationships when dropping and recreating tables in Fabric Warehouse is not yet available. However, your suggestion is definitely valuable! We use customer feedback like yours to prioritize future features. The more users who request the ability to customize backgrounds, the higher it moves on our list.

     

    Appreciate if you could share the feedback on our Microsoft Fabric Ideas. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.

     

    I hope this information helps. If you have any further queries please do let us know.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi DerekBaker 
      We haven’t heard from you on the last response and was just checking back to see if your query got resolved. Otherwise, will respond back with the more details and we will try to help.
      Thanks

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi @DerekBaker 
        We haven’t heard from you on the last response and was just checking back to see if your query got resolved. Otherwise, will respond back with the more details and we will try to help.
        Thanks

  • frithjof_v's avatar
    frithjof_v
    Icon for Community Champion rankCommunity Champion

    DerekBaker have you tried dropping and recreating the table, and checked if the relationship is still there or if it needs to be recreated?

     

    I have experienced some times that relationships persist even if they shouldn't logically be there anymore. https://community.fabric.microsoft.com/t5/General-Discussion/Dropping-and-recreating-lakehouse-table/m-p/3831977/highlight/true#M6257

     

    If they do get dropped, perhaps you can recreate them in code by applying constraints on the new table. Otherwise I guess you will need to do it in the user interface...

     

    I agree, not being able to alter tables sounds like something that can create a lot of extra work when having semantic models, shortcuts and other downstream dependencies.