Skip to the page
Tecyfy

Databricks interview question · easy

Can you discuss how Delta Lake improves data management in Databricks?

The short answerDelta Lake turns files in cloud storage into reliable tables: it adds a transaction log on top of Parquet files that gives ACID transactions, schema enforcement, table history and time travel, and the statistics needed for fast queries.

The full answer

Delta Lake turns files in cloud storage into reliable tables: it adds a transaction log on top of Parquet files that gives ACID transactions, schema enforcement, table history and time travel, and the statistics needed for fast queries.

1. ACID transactions

  • Problem: plain data lakes have no transactions, so a failed job can leave half-written files, and readers can see data mid-write.
  • Delta Lake: every change is committed as one entry in the _delta_log transaction log. A version either exists completely or not at all, and readers always see a consistent snapshot. Concurrent writers are handled with optimistic concurrency control.

2. One table for batch and streaming

  • Problem: separate systems for streaming and batch data meant duplicated pipelines.
  • Delta Lake: the same table can be written by a stream and read in batch, or the other way round.

3. Schema enforcement and evolution

  • Problem: a file with the wrong columns silently breaks downstream jobs.
  • Delta Lake: writes that do not match the table's schema are rejected, and the schema can be evolved on purpose (mergeSchema, ALTER TABLE). NOT NULL and CHECK constraints add rules.

4. History and time travel

  • Problem: undoing a bad load in a data lake means rebuilding by hand.
  • Delta Lake: DESCRIBE HISTORY shows every change with who made it and when; VERSION AS OF and TIMESTAMP AS OF query old versions, and RESTORE rolls a table back.

5. Row-level changes

  • MERGE, UPDATE and DELETE work on lake files, which makes upserts, change data capture and privacy deletions practical. Deletion vectors make small changes cheap by marking rows instead of rewriting files.

6. Performance

  • The log stores file-level statistics, so queries skip files that cannot match (data skipping).
  • OPTIMIZE compacts small files, and liquid clustering keeps data laid out by the columns queries filter on.
  • On Unity Catalog managed tables, predictive optimization runs this maintenance automatically.

In summary, Delta Lake gives a data lake the reliability of a warehouse while keeping open files in your own storage. That combination is what Databricks calls the lakehouse.

Last updated 16 October 2026