How an insert operation works in a Delta Lake table.
_delta_log
) and Parquet files are updated.
1.parquet
):id | name |
---|---|
1 | Arun |
2 | Bala |
(3, "Raj")
.1.parquet
, and the transaction log (0.json
) records this initial state:1.parquet
, and the transaction log (0.json
) reflects that.(3, "Raj")
, the following happens:
Insert operation on a delta table
2.parquet
) is created: This file contains only the new row: (3, "Raj")
.
1.json
) is created to record the addition of 2.parquet
.
1.parquet
: Contains the original rows (1, "Arun")
and (2, "Bala")
.
2.parquet
: Contains the new row (3, "Raj")
.
_delta_log
) now has two entries:
0.json
: Records the creation of 1.parquet
.1.json
: Records the addition of 2.parquet
.1.parquet
and 2.parquet
.id | name |
---|---|
1 | Arun |
2 | Bala |
3 | Raj |
1.parquet
. There are a few reasons for this: