Home / Data Analyst practice test / Executing queries using Databricks SQL and Databricks SQL Warehouses / Question

Databricks Data Analyst Associate · free practice question

A data engineer needs a Delta table to support time travel queries going back 60 days. The default VACUUM retention is 7 days. Which combination of table…

Exam-style question on Executing queries using Databricks SQL and Databricks SQL Warehouses from the free Data Analyst practice test, with the answer and a full explanation below.

Updated November 10, 2026

Executing queries using Databricks SQL and Databricks SQL Warehouses

A data engineer needs a Delta table to support time travel queries going back 60 days. The default VACUUM retention is 7 days. Which combination of table property settings guarantees that both data files and transaction logs are retained long enough to satisfy this requirement?

  1. ASet delta.logRetentionDuration = 'interval 60 days' with ALTER TABLE; the log retention setting governs both the transaction log files and the underlying data files, so this one property covers 60-day time travel
  2. BBefore each VACUUM, run SET spark.databricks.delta.retentionDurationCheck.enabled = false and VACUUM RETAIN 1440 HOURS; the session setting and RETAIN clause persist on the table and extend log retention to 60 days
  3. CSet delta.deletedFileRetentionDuration = 'interval 60 days' and delta.logRetentionDuration = 'interval 60 days' with ALTER TABLE; the first keeps data files from VACUUM and the second keeps the log history for 60 days
  4. DSet delta.deletedFileRetentionDuration = 'interval 60 days' with ALTER TABLE; Delta Lake keeps the transaction log indefinitely by default, so no log setting is needed to support 60-day time travel queries
  5. ESet delta.timeTravel.maxVersionAge = 60 with ALTER TABLE; this dedicated Delta Lake property sets the maximum age of versions reachable with TIMESTAMP AS OF or VERSION AS OF and retains files and log to match
Answer & explanation

Correct answer: C

WHY C: Two independent settings control time travel retention. delta.deletedFileRetentionDuration sets the minimum age before VACUUM removes data files, so it has to be at least 60 days to keep the files that older versions need. delta.logRetentionDuration controls how long transaction log entries are kept (30 days by default) and also has to be extended to at least 60 days. Both are required.

WHY NOT A: logRetentionDuration controls the transaction log, not the underlying data files; without extending deletedFileRetentionDuration, VACUUM still removes data files after 7 days.

WHY NOT B: Disabling the retention check and passing RETAIN is risky and per-session: nothing is persisted on the table, it does not protect against a later VACUUM run with the default threshold, and it does not extend log retention.

WHY NOT D: The transaction log is not retained indefinitely by default; its default retention is 30 days through logRetentionDuration, which has to be extended for 60-day time travel.

WHY NOT E: delta.timeTravel.maxVersionAge is not a real Delta Lake table property; retention is controlled through deletedFileRetentionDuration and logRetentionDuration.

Take the full Data Analyst practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Data Analyst Associate practice test. Take it and get a section-by-section score.

Start the free test →