Forum Discussion
Cannot Remove Invalid Table "_delta_log._commits" — SQL Sync Blocked
- 1 year ago
Hi Antongig
Somewhere you deleted the transaction log file or data is corrupted due to _delta_log. For that, you need to delete the whole table ( single table ) and recreate the table using Python or scala commands which ever you think is relevant.
Also, Which database are you using as a source. I mean to say Azure SQL. SQL Server...etc.
- Antongig1 year agoFrequent Visitor
Hi Bhavesh, thanks for replying!
I use Silver_Lakehouse as part of a production data pipeline where:
Tables are copied from Bronze to Silver using Spark notebooks and pipelines
SQL sync is required for warehouse access and reporting
Several downstream reports and jobs depend on these tables
The issue is that Fabric tries to sync a non-existent table _delta_log._commits, likely due to a failed write or interrupted notebook cell.
I’ve tried:Dropping the table via Spark SQL (DROP TABLE)
Deleting folders via file paths
Recreating and overwriting the table
Listing all tables (it doesn't appear)
Nothing worked. Now SQL sync always fails.
I cannot delete the Lakehouse easily because many pipelines and references are linked to it by name.Do you have any suggestion for clearing this ghost table or triggering a hard SQL sync refresh?
- BhaveshPatel1 year ago
Super User
Hi Antongig
Somewhere you deleted the transaction log file or data is corrupted due to _delta_log. For that, you need to delete the whole table ( single table ) and recreate the table using Python or scala commands which ever you think is relevant.
Also, Which database are you using as a source. I mean to say Azure SQL. SQL Server...etc.
- Antongig1 year agoFrequent Visitor
The Lakehouse uses Delta Lake format underneath on OneLake storage.
I already tried deleting and recreating the table, but Fabric’s SQL sync still reports _delta_log._commits as a table, even though it doesn’t exist anymore. I tried:
spark.sql("DROP TABLE IF EXISTS Silver_Lakehouse.`_delta_log._commits`")and I also tried:
tables_path = "/lakehouse/default/Tables" for i in os.listdir(tables_path): if "commits" in i: print(i)in my notebook in fabric. Both does absolutely nothing.
- v-menakakota1 year ago
Community Support
Hi Antongig ,
Thanks for reaching out to the Microsoft fabric community forum.
You could try using the Lakehouse REST API to list all the tables in your Lakehouse sometimes it shows hidden or stuck entries that don’t appear with ShowTables.
Look for the_delta_log._commits entry using the GET tables API call. If it shows up there, it means the metadata is still registered in the backend.
Here’s the link to the API documentation which may help you:
Lakehouse management API - Microsoft Fabric | Microsoft Learn
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Community Support Team- Antongig1 year agoFrequent Visitor
This solution did not work out as the get request via API showed only the tables I already could see in the fabric UI in the browser. So I have to create a ticket for microsoft support.