cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Why do we need CRC files in Delta logs. How does CRC file help for the transaction control in Delta

brickster_2018
Databricks Employee
Databricks Employee
 
5 REPLIES 5

elgeo
Valued Contributor II

Could someone provide any insight?

User16752240150
New Contributor II

Every 10 transactions json files in the _delta_log are converted to parquet files. The .crc file is a checksum added to prevent corruption if a parquet file is corrupted in flight

Dineshvishe
New Contributor II

crc is used for checksum data and data verification

saurabh18cs
Contributor II

CRC (Cyclic Redundancy Check) files in Delta Lake logs play a crucial role in ensuring data integrity and consistency. They are used to verify the integrity of the data files and transaction logs. Here's how CRC files help with transaction control in Delta Lake:

 

Role of CRC Files in Delta Lake

  1. Data Integrity: CRC files store checksums for data files and transaction logs. These checksums are used to verify that the files have not been corrupted or tampered with.
  2. Transaction Consistency: Delta Lake uses CRC files to ensure that all parts of a transaction are consistent. If any part of a transaction is corrupted, the CRC check will fail, and the transaction will be rolled back or flagged for correction.
  3. Error Detection: CRC files help detect errors in data files and transaction logs. When a file is read, its checksum is compared with the stored CRC value. If they do not match, it indicates that the file has been corrupted.
  4. Efficient Validation: CRC checksums provide a lightweight and efficient way to validate the integrity of files without having to read the entire file content. This speeds up the validation process, especially for large datasets.

Panda
Valued Contributor

@brickster_2018  @elgeo 

CRC ensures: Correctness, Recovery, Consistency

Checksum Verification
Read Validation
Consistent Transactions
Recovery Mechanism
Commit Optimization

It(CRC) ensures data isn't corrupted during storage or transfer, verifies consistency during reads, maintains atomicity by checking file integrity, triggers recovery on mismatch & speeds up validation without full scans.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group