Forum Discussion

Fabricator's avatar
Fabricator
New Member
2 years ago

Adding a column to a Fabric sematic model table

When I add a new column to a table (in Fabric Lakehouse) it does not appear when I refresh the Fabric semantic model. I have to go to 'edit tables', remove the table, and then add it again, causing me to lose all the relationships I created for that table.

 

Is there a better way to do this?

15 Replies

  • Please follow these steps to update the newly added column in your semantic model:

    1. Add the new column to your table.

    2. Open your Fabric semantic model.

    3. Navigate to Edit Tables.

    4. Locate and click the refresh button on the upper right side to retrieve the latest table information from the data source.

    5. Click Confirm.

    This should allow you to see the newly added column without losing any existing relationships.

    Note: You don't need to refresh your semantic model for updating the newly added column.

     

    I hope this helps!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Fabricator 

     

    Adding a new column to the table of the data source is part of a schema change for the table.

     

    This is explained in the documentation

     

     

    Data refresh in Power BI - Power BI | Microsoft Learn

     

    If you want to refresh the table schema you changed, you can refresh it in Desktop and then republish it to Service.

     

     

     

     

    Best Regards,

    Jayleny

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Fabricator's avatar
      Fabricator
      New Member

      Thanks for the reply.

       

      This is in Fabric. The semantic model was created in Fabric and not published from Desktop.

      • richwellman7's avatar
        richwellman7
        Regular Visitor

        I had to open the report in Power BI desktop.

         

        The went to open model and select the table with the missing column.

        Click on the 3 dots menu on the upper right of the table

        Select edit query

        Power query will open and indicate that the model is out of sync

        Acknowledge the error message and it should import the new column.

        Click Close and Apply to exit power query.

        The semantic model should have the new column im it.

         

        At least that worked for me.

         

        Rich W

  • Try editing a Power BI report that is built on your semantic model.

     

    My understanding of the documentation that Anonymous linked is that Fabric live or direct lake semantic models can't really be refreshed because they simply pass through the source data. Trying to edit and refresh a Power BI report that touches that source data prompts the semantic model to update its schema for the fields flowing through. 

     

    Its either something like that or there's just a random amount of time for the semantic model to notice the source table schema has changed.

  • MarcoDa28's avatar
    MarcoDa28
    Frequent Visitor

    Hello,

    I have the same problem using Microsoft Fabric. I added a field in my warehouse, but it's not visible in an existing (and refreshed) semantic model. I work in the Fabric Web Environnement. Did you find a way to refresh the semantic model, including the structure, without having to delete and recreate the semantic model and losing the relationship and mesures?

    Thank you,
    Marco

    • JP_Wisco's avatar
      JP_Wisco
      Icon for Helper I rankHelper I

      I've discovered that I'm now getting consistent results opening the semantic model in the Fabric web environment and then clicking the "Edit tables" option from the ribbon. This causes Fabric to fetch a fresh version of the schema. I'll just confirm my tables without adding or dropping any from my semantic model and it refreshes my semantic model view.

       

      edit: spelling

      • MarcoDa28's avatar
        MarcoDa28
        Frequent Visitor

        Thank you very much for your quick response. I've already tried to do this, but the field still doesn't appear in the model. The table in question, which is in a Warehouse, is grayed out in the screen you mentioned because I have measures inside. Is this also the case for you?

         

        Thank you,

        Marco

         

  • tjreaume's avatar
    tjreaume
    Frequent Visitor

    I'm working in the Fabric semantic model, (not default but one I created) and I am having the same issue.  I have verified the field is visible and exists in my data source, I have refreshed my semantic model, I have opened edit tables, and opened edit tables and hit the refresh button next to the search bar.  I am still not getting the new field on that table.  Its a dimension table but I'd really rather not remove / add the table from the model as I have hierarchies and then associated calculation groups related to it.

     

    Has anyone figured out how to update your semantic model tables for column changes?

  • Please follow these steps to update the newly added column in your semantic model:

    1. Add the new column to your table.

    2. Open your Fabric semantic model.

    3. Navigate to Edit Tables.

    4. Locate and click the refresh button on the upper right side to retrieve the latest table information from the data source.

    5. Click Confirm.

    This should allow you to see the newly added column without losing any existing relationships.

    Note: You don't need to refresh your semantic model for updating the newly added column.

     

    I hope this helps!

    • esjetmore's avatar
      esjetmore
      Frequent Visitor

      Hello! I'm having this same problem and this solution did not work for me. Has anyone found another way?

    • eneri's avatar
      eneri
      Icon for Helper I rankHelper I

      Hi, I'm also having the same issue and the refresh button in the "Edit Tables" window doesn't solve it. Has anyone found a solution?

    • sassy0112's avatar
      sassy0112
      Frequent Visitor

      This worked for me. Thank you!

  • tjreaume's avatar
    tjreaume
    Frequent Visitor

    By the sounds of it the workaround is to have Power BI desktop installed and work from there.  Being a developer of the warehouse and the semantic models I do not actually create the reports and do not have Power BI desktop installed at this time as I'm working only through the Fabric applications or 3rd party Tabular editor.  Will it work if you use the Power BI service that is embedded in Fabric - has anyone tried?

     

    Seems a bit silly that you can create models and so on in the service but cannot edit or adjust them for schema changes without leaving the workspace environment.

     

    But will give the Power BI desktop a go as I'm getting very tired of having to rebuild my semantic model every time I make a fact table structure change during the development cycle.