- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 05:26 AM
Hello, thank you for your question.
Since your source is not a continuous streaming source, you’ll need to implement custom checkpointing manually. The best approach is to store the maximum processed row version in a separate checkpoint table. Here’s a simple strategy:
-
Create a Checkpoint Table
Maintain a table (e.g.,checkpoint_table) with a single row containing the last processed row version. -
Retrieve the Last Processed Row Version
Query thecheckpoint_tablebefore each run to get the last processed row version. -
Query New Records
Fetch records whererow_version > last_processed_version. -
Process the Data
After processing, updatecheckpoint_tablewith the new maxrow_versionfrom the processed data.
You can implement this in a Databricks notebook using Delta Lake tables to ensure ACID compliance. While Delta Live Tables (DLT) has built-in checkpointing for streaming sources, this manual checkpointing approach is necessary for batch ingestion. Let me know if you need more details on implementation!