Which command sequence would correctly delete unreferenced files older than the retention policy for a Delta table?

Prepare for the Fabric Analytics Engineer Associate Test with comprehensive materials. Explore flashcards, multiple choice questions, and detailed explanations. Get ready for your success!

Multiple Choice

Which command sequence would correctly delete unreferenced files older than the retention policy for a Delta table?

Explanation:
Focus on physically removing old, unreferenced data files. In Delta Lake, data files are tracked by the transaction log, and when you update or delete data, older files may no longer be referenced by any version. They aren’t deleted immediately to preserve time travel, so you need a cleanup step. The VACUUM command performs this cleanup: it scans for files that are no longer referenced by any Delta table version and that fall outside the retention window, then deletes them to reclaim storage. You can adjust the retention window with RETAIN to control how far back you want to preserve data. The other commands don’t perform this kind of file cleanup: MERGE updates or upserts data; OPTIMIZE reorganizes files for performance; DELETE removes data at the logical level but relies on VACUUM to remove the actual unreferenced files afterward.

Focus on physically removing old, unreferenced data files. In Delta Lake, data files are tracked by the transaction log, and when you update or delete data, older files may no longer be referenced by any version. They aren’t deleted immediately to preserve time travel, so you need a cleanup step. The VACUUM command performs this cleanup: it scans for files that are no longer referenced by any Delta table version and that fall outside the retention window, then deletes them to reclaim storage. You can adjust the retention window with RETAIN to control how far back you want to preserve data. The other commands don’t perform this kind of file cleanup: MERGE updates or upserts data; OPTIMIZE reorganizes files for performance; DELETE removes data at the logical level but relies on VACUUM to remove the actual unreferenced files afterward.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy