Forum Discussion

jimmy101's avatar
jimmy101
Frequent Visitor
2 years ago

Error in Semantic Model After Table Upsert

I have data flowing as showin the diagram below on Image 1.  When I do the upsert to the Fabric Warehouse table with 50M rows and refresh the Semantic model, simply getting a sum on a column fails as shown on Image 2.  Other smaller tables within the model that follow the same process work well.  I try running a simple query on DAX Studio and get the error shown in Image 3.  In order to remediate the issue, I have to recreate the table with the SQL steps shown in Image 4.  After I recreate the table in the warehouse within Workspace A with the sql as shown on image 4 everything works fine until the next I complete the upsert process. 

 

I am completing the upsert by bringing the source data into a staging table for records whose modified date is greater than the max modified data on the target table.  Once the new data is loaded on the staging table, I locate any matching (modified) records in the target table and delete them.  Finally insert all records in the staging table onto the target table.  This issue seems to be new and is preventing this solution from going to production.

 

Image 1

Image 2

 

Image 3

 

Image 4

 

 

 

 

 

4 Replies

  • AndyDDC's avatar
    AndyDDC
    Icon for Most Valuable Professional rankMost Valuable Professional

    Not sure if it'll make a difference but could you do a CLONE instead of the SELECT * INTO. So clone the fact temp back to the fact. Just to see if there's any metadata issue with the underlying Delta.

     

    sp_rename works too

    • jimmy101's avatar
      jimmy101
      Frequent Visitor

      I tried doing the CLONE instead of recreating the table with the SELECT * INTO but that failed to resolve the issue.  

       

      • v-cboorla-msft's avatar
        v-cboorla-msft
        Icon for Microsoft Employee rankMicrosoft Employee

        Hi jimmy101 

         

        Thanks for using Microsoft Fabric Community.

        Apologies for the delay in response from my end and for the inconvenience that you are facing here.

        It's difficult to tell what could be the reason for this performance. I would suggest you to create a support ticket. This is the most direct way to get official assistance and specific insights into your situation. The support team can do a thorough investigation on why this it is happening and suggest solutions.

        Please go ahead and raise a support ticket to reach our support team:

        https://support.fabric.microsoft.com/support
        Please provide the ticket number here as we can keep an eye on it.

         

        Thanks