Question 1easy#ELT
How does Delta Lake ensure ACID compliance on Databricks?
Say your answer out loud first, the way you would in the room.
In shortDelta Lake gets ACID guarantees from its transaction log: a table version exists only once its commit file is written to the deltalog folder, so every change is all or nothing.
Delta Lake gets ACID guarantees from its transaction log: a table version exists only once its commit file is written to the _delta_log folder, so every change is all or nothing.
- Atomicity: a write adds new Parquet files and then commits one log entry that adds them (and removes any replaced files). If the job fails before the commit, readers never see its files.
- Consistency: the commit checks the table's schema and constraints (such as
NOT NULLandCHECK), so a write that breaks them is rejected. - Isolation: writers use optimistic concurrency control. Each writer reads a snapshot, and at commit time Delta checks whether another commit conflicts; if so, the later writer fails or retries. Readers always see a consistent snapshot, never a half-written one.
- Durability: committed data and log files live in cloud object storage, which is durable.
Because every commit is kept in the log, the same mechanism also gives table history, time travel and RESTORE.