- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 08:06 AM
Hello there,
I currently have the problem of deleted files still being in the transaction log when trying to call a delta table. What I found was this statement:
%sql
FSCK REPAIR TABLE table_name [DRY RUN]
But using it returned following error:
Error in SQL statement: ParseException:
mismatched input 'FSCK' expecting {'(', 'CONVERT', 'COPY', 'OPTIMIZE', 'RESTORE', 'ADD', 'ALTER', 'ANALYZE', 'CACHE', 'CLEAR', 'COMMENT', 'COMMIT', 'CREATE', 'DELETE', 'DESC', 'DESCRIBE', 'DFS', 'DROP', 'EXPLAIN', 'EXPORT', 'FROM', 'GRANT', 'IMPORT', 'INSERT', 'LIST', 'LOAD', 'LOCK', 'MAP', 'MERGE', 'MSCK', 'REDUCE', 'REFRESH', 'REPLACE', 'RESET', 'REVOKE', 'ROLLBACK', 'SELECT', 'SET', 'SHOW', 'START', 'TABLE', 'TRUNCATE', 'UNCACHE', 'UNLOCK', 'UPDATE', 'USE', 'VALUES', 'WITH'}
Does anybody have an idea how I can fix this or what might cause this issue?
I'm running on Azure and use Databricks Runtime Version 9.1 (Apache Spark 3.1.2 and Scala 2.12)
- Labels:
-
Azure
-
Files
-
FSCK REPAIR
-
SQL
-
SQL Command
-
Tables
-
Transaction Log
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 08:14 AM
Remove square brackets and try executing the command
%sql
FSCK REPAIR TABLE table_name DRY RUN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 08:14 AM
Remove square brackets and try executing the command
%sql
FSCK REPAIR TABLE table_name DRY RUN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 08:18 AM
Oh wow yes that was the issue. Thank you very much.

