Forum Discussion
Cannot delete from lakehouse table
I am aware of the fact that you have to use a notebook to delete rows from a lakehouse table but every method I have used gives me the same error. I have tried Spark SQL and two methods using Python and they all come back with the following error. What am I doing wrong?
Error while decoding: requirement failed: Mismatched minReaderVersion and readerFeatures.
Method #2:
Method #3:
8 Replies
- govindarajan_d
Super User
Are you able to read data without issue?
I believe its a bug in Fabric. There seems to be some corruption in the JSON file within the _delta_log folder of the table. You can try opening the JSON file of this table and another table where you are able to delete data and compare it.
And for fixing this, I think the best approach would be to read the data in spark and write it as a new table in lakehouse and then see if it solves the version error.
- aarongiustFrequent Visitor
So it is completely unreadable from a notebook. Very strange because I put a semantic model over top of it and it is able to read it just fine. Not sure what the problem is for Spark, but DAX must read it differently.
- govindarajan_d
Super User
Hi aarongiust ,
Can you try the below on your table and then see if it works out?
ALTER TABLE <table-identifier> SET TBLPROPERTIES('delta.minReaderVersion' = '1', 'delta.minWriterVersion' = '2')
- AnonymousNot applicable
Hello aarongiust ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .
In case if you have any resolution please do share that same with the community as it can be helpful to others .
Otherwise, will respond back with the more details and we will try to help .