Retry Processing
The retry functionality in DataChain allows for selective reprocessing of records that either have errors or are missing from the final result dataset. This powerful feature works alongside the existing delta functionality, providing both incremental processing of new data and reprocessing of problematic records.
Overview
When working with large datasets, two common scenarios arise:
- Processing new data incrementally: You only want to process new data that has been added since the last run (handled by the
delta=Truefunctionality) - Reprocessing problematic records: Some records may have failed processing or produced errors that need to be fixed and reprocessed
The retry functionality addresses the second scenario while still supporting the first.
How It Works
The retry functionality allows you to:
- Identify error records: Records in the result dataset with a non-NULL value in a specified error field
- Identify missing records: Records that exist in the source dataset but are missing from the result dataset
- Reprocess only these records: Applying your full processing chain only to these records that need attention
Usage
retry can be enabled by specifying delta_retry. It is enabled only when delta is enabled.
Example: Processing Files with Error Handling
Combining Delta and Retry
The real power comes when combining both delta and retry processing:
- Delta processing: Only process new or modified records
- Retry processing: Reprocess any records that had errors previously
When both are enabled, DataChain will:
- First identify records that need to be retried (based on errors or missing records)
- Then apply delta processing to that subset
- Process only the resulting records, avoiding unnecessary reprocessing of unchanged data
This provides the most efficient way to maintain a dataset that is always up-to-date and free of processing errors.