Removing Unreferenced Delta Table Files in Fabric
Short answer
D Run the VACUUM command to remove unreferenced files from the Delta table while maintaining ACID properties.
Question
You have a Fabric tenant that contains a lakehouse named Lakehouse1. Lakehouse1 contains a Delta table that has one million Parquet files. You need to remove files that were NOT referenced by the table during the past 30 days. The solution must ensure that the transaction log remains consistent, and the ACID properties of the table are maintained. What should you do?
Key Takeaways
The VACUUM command removes files no longer referenced by the Delta transaction log, maintaining ACID consistency, whereas manual deletion breaks the table.
This page explains how to safely remove unreferenced Parquet files from a Delta table in a Microsoft Fabric lakehouse while preserving ACID properties. The correct approach is to run the VACUUM command.
Common mistake: Choosing to delete files manually via OneLake file explorer, which breaks the transaction log and destroys the ACID properties of the Delta table.
Expert Analysis
Why the Answer Is Correct
The VACUUM command recursively removes files from the Delta table directory that are no longer referenced by the table's transaction log and are older than the specified retention threshold. By using VACUUM, you ensure that the transaction log remains consistent and the ACID properties of the Delta table are fully maintained, safely cleaning up stale files like those older than 30 days.Why the Other Options Are Wrong
Deleting files directly from the OneLake file explorer bypasses the Delta transaction log, which breaks ACID consistency and can lead to corrupted table reads. The OPTIMIZE command, whether using Z-order or V-order parameters, is used for file compaction and performance optimization by merging small files into larger ones, not for removing unreferenced old files.Community Comment Notes
Commenters correctly pointed out that VACUUM acts like a real vacuum cleaning up dust, as vernillen noted, "Cleanup of dust just lying around". Nefirs provided the official Microsoft Learn documentation link confirming that VACUUM is the proper method to remove files no longer referenced by the current version of the table.Official Reference
Exam Strategy
When asked to remove old or unreferenced files from a Delta table while maintaining ACID properties, always choose the VACUUM command. Remember that OPTIMIZE is for file compaction and query performance, not for deleting stale data files.
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded.
From public community threads 4
-
Nefirs 👍 10 Answered DD: https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-table-maintenance
-
prabhjot 👍 4Yes D - To remove files from a Delta table that are no longer referenced by the current version of the table, you should run the VACUUM command.
-
vernillen 👍 3 Answered DJust think of the aspect of a real VACUUM: Cleanup of dust just lying around
-
stilferx 👍 2 Answered DIMHO, D) Vacuum is good
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DP-600 Questions
Access 115 questions with complete answers and detailed explanations.
View Full DP-600 Practice Test →