<@U04S8PLJWMT> I am getting this error when trying...
# ask-ai
j
@kapa.ai I am getting this error when trying to sync from mssql source... how can i troubleshoot it? 025-07-10 131213 source ERROR debezium-sqlserverconnector-sourcename-change-event-source-coordinator i.d.r.RelationalSnapshotChangeEventSource(doExecute):193 Error during snapshot java.util.concurrent.ExecutionException: java.lang.InterruptedException: Interrupted while snapshotting
k
The error message you are seeing,
java.util.concurrent.ExecutionException: java.lang.InterruptedException: Interrupted while snapshotting
, indicates that the snapshot process for your MSSQL source was interrupted. This is a generic error that can be caused by several factors, such as resource constraints, timeouts, or external interruptions. Here are some troubleshooting steps based on the available knowledge sources: 1. Check Resource Limits: Ensure that your Airbyte worker and connector pods have sufficient CPU and memory resources. Java heap space or memory issues can cause interruptions during snapshotting, especially with large tables or high row counts. Review your Kubernetes or Docker resource allocations and consider increasing them if you see memory-related errors or OOM kills. For example, in one case, increasing memory limits helped resolve Java heap space errors during CDC syncs with large change tables [Java heap space error in MSSQL source connector](https://github.com/airbytehq/airbyte/discussions/48348). 2. Review Logs for More Details: Look for additional error messages in the Airbyte logs around the time of the failure. Sometimes, the root cause (such as a timeout, OOM, or cancellation) is logged before the stack trace. 3. Check for External Interruptions: The snapshot process can be interrupted by external factors, such as pod restarts, manual job cancellations, or infrastructure issues. Ensure that your environment is stable during the initial snapshot. 4. Snapshot Isolation: Make sure that snapshot isolation is enabled on your MSSQL database, as required by Airbyte for CDC syncs. This helps avoid locking issues and interruptions during the initial snapshot. You can enable it with:
Copy code
ALTER DATABASE {database name}        SET ALLOW_SNAPSHOT_ISOLATION ON;
[Setting up CDC for MSSQL](https://docs.airbyte.com/integrations/sources/mssql#setting-up-cdc-for-mssql) 5. Large Tables or Long Snapshots: If your tables are very large, the snapshot can take a long time and may be more susceptible to interruptions. Consider running the initial sync during off-peak hours or splitting large tables if possible. If after checking these areas the issue persists, please provide more detailed logs or context (such as resource settings, Airbyte version, and connector version) to help further diagnose the problem. If you need more specific guidance, please share additional log output or configuration details. The knowledge sources do not provide a single root cause for this error, but the above steps are the most common troubleshooting approaches for snapshot interruptions in Airbyte MSSQL CDC syncs.
A message from kapa.ai
Sorry @jorge-gt3, I'm currently experiencing some technical difficulties. Please try again in a few minutes. If this issue persists, please reach out to the administrators of this Slack workspace.
j
@Justin McFarland ☝️
j
2025-07-14 105354 source ERROR debezium-sqlserverconnector-VendSysReplica-change-event-source-coordinator i.d.p.ErrorHandler(setProducerThrowable):52 Producer failure io.debezium.DebeziumException: java.util.concurrent.ExecutionException: java.lang.InterruptedException: Interrupted while snapshotting table I am getting this same error @kapa.ai
k
A message from kapa.ai
The error message you are seeing:
Copy code
Producer failure io.debezium.DebeziumException: java.util.concurrent.ExecutionException: java.lang.InterruptedException: Interrupted while snapshotting table
indicates that the Debezium connector (used by Airbyte for CDC) was interrupted during the snapshotting phase of a table in your MSSQL source. This is a generic error and can be caused by several factors, but the knowledge sources do not provide a single, definitive root cause or solution for this specific error. Based on the knowledge sources, here are some troubleshooting steps: 1. Resource Constraints: Large tables or high data volumes can cause the snapshot process to take a long time or consume significant resources. If your environment is low on memory or CPU, the process may be interrupted. Consider increasing the memory and CPU limits for your Airbyte worker and connector pods, as resource exhaustion has been linked to similar issues in other connectors and CDC jobs [Java heap space error in MSSQL source connector](https://github.com/airbytehq/airbyte/discussions/48348). 2. External Interruptions: The snapshot process can be interrupted by pod restarts, manual job cancellations, or infrastructure issues. Ensure your Airbyte deployment is stable and not being restarted or interrupted during the initial snapshot. 3. Snapshot Isolation: Airbyte requires snapshot isolation to be enabled on the MSSQL database for CDC to work reliably. If not enabled, the snapshot process may encounter issues. You can enable it with:
Copy code
sql    ALTER DATABASE {database name} SET ALLOW_SNAPSHOT_ISOLATION ON;
[Regarding CDC option for Replication Method (MSSQL Server connector)](https://discuss.airbyte.io/t/453) 4. Check Logs for More Details: Review the full Airbyte and connector logs for any additional context or errors that occur before this message. Sometimes, the root cause (such as a timeout or OOM) is logged earlier. 5. Large or Long-Running Snapshots: If you are syncing very large tables, consider running the initial sync during off-peak hours or splitting the tables if possible, as long-running snapshots are more susceptible to interruptions. If the issue persists after these checks, please provide more detailed logs or configuration details for further assistance. The knowledge sources do not contain a specific fix for this error, but the above steps are the most relevant troubleshooting actions based on similar issues reported by other users.
j
@kapa.ai The sync is working and saying that it completed successfully. I just found this error in the log file and have duplicates in the database despite doing a full refresh overwrite
k
A message from kapa.ai
If your Airbyte sync is set to Full Refresh | Overwrite and is reporting success, but you are still seeing duplicate records in your destination, there are a few important points to consider based on the knowledge sources: 1. Full Refresh Overwrite Behavior In Full Refresh Overwrite mode, Airbyte is supposed to replace all data in the destination table with the new data from the source on each sync. This means that, under normal circumstances, you should not see duplicates after a successful sync. However, the actual mechanism for overwriting data can vary by destination. For certified database and data warehouse destinations, Airbyte typically writes to a temporary table and then swaps it in place of the old table. For other destinations, it may erase data at the start of the sync, but this is not guaranteed for all connectors or storage types (such as S3 or GCS) [Full Refresh Overwrite + Deduped](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/full-refresh-overwrite-deduped). 2. Duplicates After Failed or Interrupted Syncs If a sync attempt fails or is interrupted, Airbyte does not automatically clean up partially written data in the destination. This can result in duplicate records if a subsequent sync re-inserts the same data. This is a known limitation, especially for append modes, but can also affect overwrite modes if the overwrite is not atomic or if the destination does not support transactional table swaps. The knowledge sources confirm that Airbyte does not perform cleanup of already-synced data after a failure, and this can lead to duplicates if the sync is retried and succeeds later [Failed attempts leading to duplicates](https://discuss.airbyte.io/t/744), [Airbyte committing records for failed sync](https://discuss.airbyte.io/t/1064). 3. Destination-Specific Limitations Some destinations (like S3, GCS, or other file-based storage) may not support true "overwrite" semantics, and files from failed or partial syncs may remain, causing duplicates even if the sync later reports success. This has been reported by users, for example, with the S3 destination, where failed attempts leave files that are not cleaned up automatically [Duplicated data on s3 destination after multiple failed attempts](https://discuss.airbyte.io/t/1398). 4. Recommendation - If you are using a file-based destination (S3, GCS, etc.), you may need to manually clean up files from failed syncs, or consider using a destination that supports atomic table swaps for true overwrite semantics. - If you are using a database destination and still see duplicates, check if the overwrite is truly atomic and whether any failed syncs could have left partial data. - If deduplication is critical, consider using the Full Refresh Overwrite + Deduped mode, which ensures uniqueness by primary key, though this may incur additional costs and is not available for all destinations [Full Refresh Overwrite + Deduped](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/full-refresh-overwrite-deduped). Summary: Even if the sync reports success, duplicates can occur if previous failed or interrupted syncs left partial data and the destination does not fully overwrite or clean up old data. This is a known limitation, especially for file-based destinations. There is currently no built-in mechanism in Airbyte to automatically clean up data from failed syncs in all destinations. If you need more specific guidance, please provide your destination type and connector versions.
j
@kapa.ai Destination type is Redshift v 3.5.3 Source type is MSSQL v 4.2.3
k
A message from kapa.ai
Given your setup—**MSSQL (v4.2.3) as source** and **Redshift (v3.5.3) as destination**—and the fact that you are seeing duplicates in Redshift after a "Full Refresh | Overwrite" sync, here’s what the knowledge sources reveal: ### 1. Expected Behavior of Full Refresh Overwrite In "Full Refresh | Overwrite" mode, Airbyte is supposed to: - Destroy all data in the existing destination table. - Load new data from the source. - The destination table should only contain the latest data from the source after each sync, with no duplicates, assuming the overwrite is atomic and successful [Full Refresh Overwrite](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/full-refresh-overwrite). ### 2. Known Issues and Limitations - Partial Failures and Duplicates: If a sync fails or is interrupted, Airbyte does not automatically clean up partially written data in the destination. If a subsequent sync is retried and succeeds, this can result in duplicate records, even in overwrite mode. This is a known limitation and has been reported by users in the community [Failed attempts leading to duplicates](https://discuss.airbyte.io/t/744), [Airbyte committing records for failed sync](https://discuss.airbyte.io/t/1064). - Destination-Specific Overwrite Mechanism: For certified databases like Redshift, Airbyte typically writes to a temporary table and swaps it in place of the old table at the end of the sync. However, if the sync is interrupted or fails before the swap, or if the overwrite is not atomic, partial or duplicate data may remain [Full Refresh Overwrite](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/full-refresh-overwrite). ### 3. Version-Specific Issues - There have been reports of "Full Refresh Overwrite" not working correctly in some Airbyte versions and connector combinations, where after the first sync, subsequent syncs either do not read records or behave like incremental loads, sometimes leading to empty or duplicated data. Upgrading Airbyte to version 0.58.0 or above was recommended to resolve these issues [source-MSSQL Full refresh Overwrite does not work in some cases](https://github.com/airbytehq/airbyte/issues/42041). ### 4. Recommendations - Upgrade Airbyte: If you are running Airbyte below version 0.58.0, upgrade to the latest version, as several overwrite-related bugs have been fixed in newer releases. - Manual Cleanup: If duplicates persist after failed syncs, you may need to manually clean up the destination table before re-running the sync. - Monitor Sync Logs: Continue to monitor logs for errors or interruptions during the snapshot or sync process, as these can lead to partial writes and duplicates. - Consider Overwrite + Deduped: If available, use the "Full Refresh Overwrite + Deduped" mode to ensure uniqueness by primary key, though this may incur additional costs [Full Refresh Overwrite + Deduped](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/full-refresh-overwrite-deduped). --- Summary: Duplicates in Redshift after a "Full Refresh | Overwrite" sync from MSSQL can occur if previous syncs failed or were interrupted, and Airbyte did not fully clean up the destination. This is a known limitation, and upgrading Airbyte or manually cleaning the destination may be necessary. The knowledge sources do not provide a built-in automatic cleanup mechanism for this scenario.
j
@kapa.ai The problem is that the total number of records is roughly correct, but duplicates exist. So then as soon as I remove duplicates, I am short 10s of millions of records on a 50 million record table
k
A message from kapa.ai
Based on the knowledge sources, if you are using Full Refresh | Overwrite mode and you see that the total number of records is roughly correct but there are duplicates, and after deduplication you are missing tens of millions of records, this suggests that the overwrite process is not functioning as expected. This can happen due to: 1. Partial or Interrupted Syncs: If a sync is interrupted or fails, Airbyte does not automatically clean up partially written data in the destination. When the sync is retried, it may append or partially overwrite, leading to both duplicates and missing records if the overwrite is not atomic or if the swap to the new table fails. This is a known limitation, especially if the destination does not support true atomic swaps or if the sync process is interrupted [Airbyte committing records for failed sync](https://discuss.airbyte.io/t/1064), [Full Refresh Overwrite + Deduped](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/full-refresh-overwrite-deduped). 2. Destination-Specific Overwrite Mechanism: For Redshift and other certified databases, Airbyte typically writes to a temporary table and then swaps it in place of the old table. If this process is interrupted or fails, you may end up with a mix of old and new data, causing both duplicates and missing records. The overwrite mechanism can vary, and is not always guaranteed to be atomic in all failure scenarios [Full Refresh Overwrite + Deduped](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/full-refresh-overwrite-deduped). 3. Known Bugs in Certain Versions: There have been reports of "Full Refresh Overwrite" not working correctly in some Airbyte versions and connector combinations, leading to issues where the destination table is not properly overwritten, resulting in duplicates and/or missing data. Upgrading Airbyte to version 0.58.0 or above is recommended to resolve these issues [source-MSSQL Full refresh Overwrite does not work in some cases](https://github.com/airbytehq/airbyte/issues/42041). What you should do: - Upgrade Airbyte and Connectors: If you are not on the latest version, upgrade Airbyte and both connectors, as several overwrite-related bugs have been fixed in newer releases. - Manual Cleanup: Before running another sync, manually truncate or drop the destination table in Redshift to ensure no residual or duplicate data remains. - Monitor for Errors: Carefully review the Airbyte logs for any errors or interruptions during the sync process, especially around the snapshot and table swap phases. - Consider Overwrite + Deduped Mode: If available, use "Full Refresh Overwrite + Deduped" to ensure uniqueness by primary key, though this may incur additional costs. Summary: The presence of both duplicates and missing records after deduplication in a full refresh overwrite sync is a known issue, often caused by failed or interrupted syncs and non-atomic overwrite operations. Manual intervention and upgrading Airbyte are currently the recommended solutions. The knowledge sources do not mention a built-in automatic fix for this scenario.
j
@kapa.ai Even if I do append + dedupe, I am short records, but on the raw tables I can see that the only reason I am short records is that duplicate records were loaded in again and deduped in the based table. Still resulting in a variance
k
A message from kapa.ai
What you’re describing—where Incremental Append + Deduped mode results in fewer records in the final table than expected, and the raw table shows duplicate records that are then deduped away—matches known Airbyte behavior and limitations. Key points from the knowledge sources: - In Incremental Append + Deduped mode, Airbyte stores all versions of a record in the raw and history tables, but only the latest version (by primary key and cursor field) is kept in the final deduped table. If the same record (same primary key) is loaded multiple times (for example, due to retries, partial failures, or source-side issues), only the most recent one is kept in the deduped table, and the rest are discarded during deduplication. This can lead to a lower count in the final table if many duplicates are present in the raw data [Incremental Sync - Append + Deduped](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append-deduped), [Incremental Sync - Append + Deduped Rules](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append-deduped#rules). - Why does this happen? Airbyte guarantees at-least-once delivery, not exactly-once. This means that, especially after failed or retried syncs, the same record can be loaded multiple times into the raw table. Deduplication in the final table will keep only the latest version, so if the same record is loaded repeatedly, you will see fewer unique records in the deduped table than in the raw table. This is expected behavior and is documented as a limitation [Airbyte guarantees at-least-one record, so duplicates can happen in raw tables](https://discuss.airbyte.io/t/2310). - Variance in record counts: If your source emits the same record multiple times (for example, if the cursor field is not updated correctly, or if the sync logic causes re-reading of the same data), deduplication will collapse these into a single row, resulting in a lower count in the final table. This is especially common if the source system or sync configuration causes records to be re-emitted with the same primary key and cursor value [Incremental Syncing Issues on Several Connectors](https://discuss.airbyte.io/t/504), [Why and when is a primary key required](https://airbyte.com/tutorials/incremental-data-synchronization#step-2). Summary: The variance you see is a direct result of Airbyte’s at-least-once delivery and deduplication logic. If duplicate records are loaded into the raw table (due to retries, partial failures, or source-side issues), deduplication will reduce the count in the final table, sometimes significantly. This is a known and documented behavior of Airbyte’s incremental deduped sync mode. If you need to avoid this, you must ensure that: - The source emits each record only once per sync (no duplicate emission). - The cursor field is updated correctly on every change. - Syncs are not interrupted or retried in a way that causes the same data to be re-read. If you are still seeing unexpected variances after accounting for these factors, it may indicate a deeper issue with the source connector or the sync configuration, but the knowledge sources do not provide further troubleshooting steps for this scenario.
j
What would be the best way to check these things that you want me to ensure? @kapa.ai
k
A message from kapa.ai
To check the key factors that can lead to duplicate or missing records in Airbyte’s incremental syncs, you should focus on the following areas, as supported by the knowledge sources: 1. Verify Source Emission of Records - Ensure your source system emits each record only once per sync. You can do this by examining the raw tables in your destination: if you see the same primary key and cursor value appearing multiple times, your source may be re-emitting records. This is often due to the cursor field not being granular enough or not updating correctly [Incremental Sync - Append + Deduped](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append-deduped). 2. Check Cursor Field Updates - The cursor field (e.g.,
updated_at
or an incrementing ID) must be updated every time a record changes. If the cursor field is not updated, Airbyte will not recognize the record as changed and may not sync it, or may re-sync the same record multiple times. You can check this by comparing the cursor field values in your source and destination for records with the same primary key [Known Limitations](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append-deduped#known-limitations). 3. Monitor for Sync Interruptions or Retries - Review your Airbyte sync logs for any errors, interruptions, or retries. If a sync is interrupted or fails, Airbyte may re-read and re-insert records, leading to duplicates in the raw table. Only the latest version will be kept in the deduped table, which can cause missing records if the process is not handled correctly [Incremental Sync - Append + Deduped](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append-deduped). 4. Check for At-Least-Once Delivery Effects - Airbyte’s incremental syncs provide at-least-once delivery, which means duplicates in the raw table are expected, especially if the cursor is not granular or syncs are retried. You can confirm this by looking for repeated records in the raw table and understanding that deduplication will collapse these into a single row in the final table [Inclusive Cursors](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors). In summary: - Inspect your raw tables for duplicate primary key/cursor combinations. - Ensure your source updates the cursor field on every change. - Review Airbyte logs for sync failures or retries. - Understand that at-least-once delivery can cause duplicates in raw tables, which are then deduped. If you follow these checks and still see unexplained variances, it may indicate a deeper issue, but the knowledge sources do not provide further troubleshooting steps for this scenario.
j
My source is trying to use CDC. Does that change anything that you sent? @kapa.ai
k
A message from kapa.ai
Yes, using CDC (Change Data Capture) as your replication method does change some of the considerations compared to standard incremental syncs. Key differences and what to check with CDC: 1. No Need for a Cursor Field: With CDC, Airbyte reads changes directly from the database transaction log, so you do not need to specify a cursor field (like
updated_at
). The primary key is automatically determined from the source table, and changes—including inserts, updates, and deletes—are captured from the log itself. This is different from standard incremental syncs, which rely on a cursor field to detect changes [Explore Airbyte's Change Data Capture (CDC) synchronization](https://airbyte.com/tutorials/incremental-change-data-capture-cdc-replication). 2. Capturing Deletes and Intermediate States: CDC captures all changes, including deletes and multiple updates to the same record between syncs. This means the raw table in your destination will contain all intermediate states for each record, not just the latest state at the time of sync. Deduplication in the final table will keep only the latest version per primary key [Explore Airbyte's Change Data Capture (CDC) synchronization](https://airbyte.com/tutorials/incremental-change-data-capture-cdc-replication). 3. At-Least-Once Delivery Still Applies: Even with CDC, Airbyte provides at-least-once delivery. This means you may still see duplicate records in the raw table if a sync is retried or interrupted, but the deduped table should only have the latest version per primary key. If you see missing records after deduplication, it could be due to how changes are emitted from the source or how the deduplication logic is applied [Documentation > Platform > Understanding-airbyte > Change Data Capture (CDC)](https://docs.airbyte.com/platform/understanding-airbyte/cdc). 4. CDC Metadata Columns: CDC adds metadata columns (like
_ab_cdc_lsn
,
_ab_cdc_updated_at
,
_ab_cdc_deleted_at
) to help track the origin and timing of each change. You can use these columns to investigate the sequence and uniqueness of changes in your raw table [Explore Airbyte's Change Data Capture (CDC) synchronization](https://airbyte.com/tutorials/incremental-change-data-capture-cdc-replication). What to check with CDC: - Inspect the raw table for duplicate primary key and CDC metadata combinations. - Use CDC metadata columns to understand if the same change is being emitted multiple times. - Ensure your source database’s CDC setup is correct and that Airbyte is not re-reading the same log entries due to state issues or sync interruptions. - If you see missing records after deduplication, check if those records were deleted in the source (CDC will propagate deletes) or if there are issues with log retention or state tracking. Summary: CDC changes how Airbyte detects and syncs changes, but at-least-once delivery and deduplication logic still apply. Focus your checks on CDC metadata and the raw table to diagnose duplicates or missing records. If you continue to see unexplained variances, it may be related to how CDC is configured or how Airbyte is tracking log positions between syncs. If you need more detailed troubleshooting for CDC-specific issues, the knowledge sources recommend reviewing CDC setup and Airbyte’s CDC documentation for your specific source database [Documentation > Platform > Understanding-airbyte > Change Data Capture (CDC)](https://docs.airbyte.com/platform/understanding-airbyte/cdc).
j
How the source works: When a header table changes, the source deletes all records from the details table associated with that header table, and then reinserts all of the details from the detail table for that header table. Would that change anything? @kapa.ai
k
A message from kapa.ai
Yes, the way your source works—deleting all detail records for a header and then reinserting them when the header changes—**does have important implications for how Airbyte (using CDC) will replicate your data**. Here’s what happens with CDC in this scenario: - CDC will capture each DELETE and INSERT operation on the detail table. When the header changes, and all associated detail records are deleted, CDC will log those deletes. When the new detail records are inserted, CDC will log those inserts as well. - In the raw table in your destination, you will see both the delete and insert events for each affected detail record, along with CDC metadata (such as
_ab_cdc_deleted_at
for deletes). - In the final deduped table, only the latest state for each primary key will be present. If a detail record is deleted and then reinserted (with the same primary key), the deduped table will show the reinserted version. If a record is deleted and not reinserted, it will not appear in the final table, as CDC removes records whose most recent event is a delete (as denoted by
_ab_cdc_deleted_at
) [Explore Airbyte's Change Data Capture (CDC) synchronization](https://airbyte.com/tutorials/incremental-change-data-capture-cdc-replication), [Documentation > Platform > Understanding-airbyte > Change Data Capture (CDC)](https://docs.airbyte.com/platform/understanding-airbyte/cdc). Potential issues: - If the delete and insert operations for a given header’s details happen in quick succession, and the CDC log is processed in order, Airbyte should correctly reflect the latest state. - However, if there are sync interruptions, retries, or issues with log position tracking, you could see duplicate or missing records, especially if the same detail record is inserted multiple times or if deletes are not properly processed. Summary: Your described pattern is supported by CDC and Airbyte will replicate the deletes and reinserts as long as the CDC log is processed correctly. The deduped table will show only the latest version of each detail record, and records that are deleted and not reinserted will be removed from the final table. If you see unexpected duplicates or missing records, it may be due to sync interruptions or issues with how CDC events are processed, not the source’s delete/insert logic itself. If you need to investigate further, check the raw table for the sequence of CDC events and use the CDC metadata columns to trace what happened for each primary key.
j
@kapa.ai Well what I am seeing is a detail table that should have around 49 million records. The raw table stops around the 49 million records on the initial sync, but it is duplicating records in the raw table. I looked at the records of the duplicates in the detail table and they are true duplicates. How can I ensure that Airbyte pulls a 1 to 1 on the initial load from my MSSQL source (I've already tried a full refresh overwrite and still see the same issue)?
k
A message from kapa.ai
Based on the knowledge sources, here’s what you need to know and what you can do: ### Why You’re Seeing Duplicates in the Raw Table - At-least-once delivery: Airbyte’s sync process guarantees at-least-once delivery, not exactly-once. This means that, especially during the initial sync or if there are retries or interruptions, duplicate records can appear in the raw table—even in Full Refresh Overwrite mode. This is a documented behavior and is not considered a bug, but a tradeoff to ensure no data is missed [What is the "guarantee" of Airbyte data extraction?](https://discuss.airbyte.io/t/817), [Sync from Salesforce got duplicate records](https://discuss.airbyte.io/t/2310). - Full Refresh Overwrite limitations: Even with Full Refresh Overwrite, if a sync is interrupted or fails, Airbyte does not automatically clean up partially written data in the destination. This can result in duplicates if the sync is retried and data is reloaded [Sync Modes](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes). ### Ensuring a 1-to-1 Initial Load The knowledge sources do not provide a built-in way to guarantee exactly-once (1-to-1) delivery in the raw table for the initial sync. Duplicates in the raw table are expected due to the at-least-once delivery model. The deduped/final table is designed to provide a unique, up-to-date view by primary key, but the raw table may contain duplicates. What you can do: - Manual Deduplication: If you require a 1-to-1 mapping in the raw table, you will need to manually deduplicate the data after the sync, using the primary key and relevant CDC metadata. - Monitor for Sync Interruptions: Ensure that your syncs are not being interrupted or retried, as this increases the likelihood of duplicates. - Check Source Data: If the duplicates are true duplicates (identical in all fields), confirm that the source system is not emitting them multiple times during the snapshot or CDC process. Summary: Airbyte’s current design does not guarantee a 1-to-1, duplicate-free initial load in the raw table due to its at-least-once delivery model. Duplicates in the raw table are expected and must be handled downstream. If you need a strictly unique set of records, you must deduplicate after the sync, or rely on the deduped/final table produced by Airbyte’s normalization process. If you are seeing duplicates in the deduped/final table, that would be unexpected and may indicate a deeper issue. If you need further assurance or a different delivery guarantee, the knowledge sources do not mention a configuration or feature in Airbyte that provides exactly-once delivery for the raw table.
j
@kapa.ai I think you a missing the fact that when the raw table does have duplicate records, that is fine because I have also tried with append + dedup, but I am now missing 10-20 million records because the raw table stops loading at 49 million records
k
A message from kapa.ai
Thank you for clarifying. Based on your description and the knowledge sources, here’s what can be concluded: - Duplicates in the raw table are expected due to Airbyte’s at-least-once delivery guarantee, especially with CDC and during large initial syncs. This is not considered a bug, but a known behavior of Airbyte’s sync process [Incremental Sync - Append + Deduped](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append-deduped). - The critical issue is that the raw table stops at 49 million records, even though you expect more (and are missing 10–20 million records in the deduped table as well). This suggests that the sync is not capturing all records from the source, rather than just being a deduplication artifact. ### What the Knowledge Sources Say - CDC and Large Initial Loads: For large tables, especially with CDC, Airbyte relies on Debezium to read the initial snapshot and then stream changes. If the snapshot process is interrupted, times out, or hits resource limits, it may not complete, resulting in an incomplete raw table. The logs you shared earlier (with
InterruptedException: Interrupted while snapshotting table
) indicate that the snapshot process was interrupted, which can cause the sync to stop before all records are loaded. This is a known risk with large tables and CDC [Error during snapshot java.util.concurrent.ExecutionException: java.lang.InterruptedException: Interrupted while snapshotting](https://discuss.airbyte.io/t/3752). - No Built-in Automatic Retry for Partial Snapshots: If the initial snapshot is interrupted or fails, Airbyte does not automatically retry or resume from where it left off. This can result in a raw table that is missing a significant portion of the source data, especially for very large tables [Known Limitations](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append-deduped#known-limitations). - Resource Constraints and Timeouts: Large initial syncs can be affected by memory, CPU, or timeout limits. If the connector or Airbyte worker runs out of resources, the snapshot may be interrupted, and not all records will be loaded [Error during snapshot java.util.concurrent.ExecutionException: java.lang.InterruptedException: Interrupted while snapshotting](https://discuss.airbyte.io/t/3752). ### What You Can Do - Check Airbyte and Connector Logs: Look for any errors or interruptions during the initial snapshot phase. The presence of
InterruptedException
or similar errors is a strong indicator that the sync did not complete. - Increase Resource Limits: Allocate more memory and CPU to your Airbyte workers and connectors, as large tables require significant resources to snapshot and stream changes. - Retry the Sync After Manual Cleanup: If the initial sync was interrupted, truncate or drop the destination tables and retry the sync after increasing resources and ensuring no external interruptions. - Consider Syncing in Batches: If possible, split the large table into smaller chunks or sync smaller tables first to reduce the load on the system. --- Summary: The knowledge sources indicate that if your raw table stops loading at a certain point (e.g., 49 million records) and you are missing millions of records, it is likely due to an interrupted or incomplete initial snapshot, often caused by resource constraints or timeouts. Duplicates are expected, but missing records are not, and this points to a sync failure or interruption rather than a deduplication issue. There is no built-in automatic recovery for partial snapshots; you must address resource issues and retry the sync to capture all records. If you continue to see this issue after addressing resources and ensuring uninterrupted syncs, the knowledge sources do not provide further troubleshooting steps for this specific scenario.
j
@kapa.ai i am still seeing this debezium errors, can i tweak the snapshot.fetch.size?
k
A message from kapa.ai
I'm sorry, but the knowledge sources do not provide explicit information on whether you can tweak the
snapshot.fetch.size
parameter for Debezium in Airbyte's MSSQL source connector. There are references to Debezium parameters and resource tuning in general, but no direct documentation or guidance on configuring
snapshot.fetch.size
specifically within Airbyte's configuration for MSSQL or other connectors. If you need to adjust Debezium settings, you may want to review the connector's documentation or open a feature request with the Airbyte team. For now, the knowledge sources do not confirm that this parameter can be set directly in Airbyte.