Can you tell me what vacuum is in Databricks?
💡 Model Answer
In Databricks, the VACUUM command is used with Delta Lake tables to remove obsolete or deleted files from the underlying storage. Delta Lake keeps a transaction log that records every change. When rows are deleted or updated, the old files remain in storage until they are cleaned up. VACUUM deletes these old files that are older than a specified retention period (default 7 days). This helps reclaim storage space and keeps the table lean. It is important to set a reasonable retention period to avoid accidental data loss, especially in production environments. The command syntax is: VACUUM table_name RETAIN 168 HOURS; where 168 hours equals 7 days.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers — invisible to screen sharing.
Get Assisting AI — Starts at ₹500