Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
rcufley-lrdist
Frequent Visitor

Lakehouse SQL endpoint tables "Sync Error" after adding a column to table

Hi,

 

Having an issue with the Lakehouse SQL Endpoint tables report a "Sync Error" state after adding a column to the deltatable.

For example:

Initially created a DimDate table via:

 

 

df.write.format('delta').mode("overwrite").option("overwriteSchema", True).save('Tables/DimDate')

 

 

Table was accessable via SQL Endpoint

After adding a column for "MonthEndDate" to the dataframe and running the notebook again, SQL Endpoint of DimDate does not show the new column and reports this error:

 

rcufleylrdist_0-1687475602783.png


MonthEnd is not available via the SQL Endpoint, however it is available within spark queries:

rcufleylrdist_1-1687476097725.png

 

Am I doing something incorrect in the saving of the dataframe?  Also got same result when merging schema instead of overwriting.

Any insight appreciated, thanks!



 

 

 

4 REPLIES 4
rcufley-lrdist
Frequent Visitor

Turns out the issue was foreign keys inhibit syncing of the schema.

 

Limitations and known issues - Microsoft Fabric | Microsoft Learn

 

rcufleylrdist_0-1687526877715.png

 

Dropped the constraints and tables sync'd and issue resolved

Interesting. I had some relationships defined in my Lakehouse SQL Endpoint, added columns to 2 tables in Spark, then ran into your same issue.

I removed all relationships from the model, and the SQL Endpoint is still having issues syncing. This is after waiting for 15 mins, trying to force a refresh from button in top left corner. Nothing seems to get it to sync again.

 

What exactly did you do after removing the relationships to get it to sync again?

After removing the relationships from the model, I also deleted the foreign key constraints via a SQL endpoint query.   

For example:

 

-- identifiy the foreign key constraint for each fact table
sp_fkeys
'FactSales'

-- then drop it

ALTER TABLE dbo.FactSales DROP CONSTRAINT FK_bd9f34c4_b835_4e87_956a_xxxxxxxxxxxx

That resolved my issue, thank you so much!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.