Ameya Bapat
10/13/2025, 6:46 PMkapa.ai
10/13/2025, 6:47 PMsql SELECT * FROM table WHERE cursor_field >= 'last_sync_max_cursor_field_value' If no records meet this condition (i.e., no new or updated data since the last sync), then zero records will be emitted during that sync run. This is expected behavior and is not specific to JDBC sources, but applies generally to how Airbyte handles incremental syncs using cursor fields [Incremental Sync - Append: Known Limitations](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#known-limitations). Additionally, if the cursor field is not updated when records are modified, those changes will not be detected, and again, no records will be emitted [Incremental Sync - Append: Known Limitations](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#known-limitations).Ameya Bapat
10/13/2025, 6:49 PMkapa.ai
10/13/2025, 6:49 PMkapa.ai
10/13/2025, 6:50 PM2024-06-01T12:00:00Z, so your last_sync_max_cursor_field_value is 2024-06-01T12:00:00Z. #### Next Sync Query The incremental sync will run a query like: sql SELECT * FROM table WHERE updated_at >= '2024-06-01T12:00:00Z' If no new records have been added or updated since the last sync, only Carol’s record (with updated_at = 2024-06-01T12:00:00Z) matches the condition. If the data hasn’t changed, this record will be emitted again. ### Will the Same Record Always Be Present in the Next Sync? Yes, if no new records are added and the cursor field value for the last record remains the same, the record with updated_at = last_sync_max_cursor_field_value will be included in every subsequent sync. This is due to the use of the >= (greater than or equal to) operator in the query. As a result, you may see the same row being emitted during each sync until new data arrives with a higher cursor value. This behavior is intentional and aligns with Airbyte’s at-least-once delivery guarantee. It ensures that no records are missed, especially when the cursor is not granular enough. However, it can result in duplicate records, which is why deduplication is often recommended downstream [Inclusive Cursors](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors). > "Additionally, you may run into behavior where you see the same row being emitted during each sync. This will occur if your data has not changed and you attempt to run additional syncs, as the cursor field will always be greater than or equal to itself, causing it to pull the latest row multiple times until there is new data at the source." > [Inclusive Cursors](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors) So, in summary: - If no new data is present, the last record (with the max cursor value) will be re-synced in each run. - This is expected and by design in Airbyte’s incremental append mode.Ameya Bapat
10/13/2025, 6:53 PMkapa.ai
10/13/2025, 6:53 PMkapa.ai
10/13/2025, 6:54 PM>= operator in the query. From the documentation: > The inclusion of the cursor in the query limits the response to only records where the updated_at value is [greater than or equal to](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors) the largest updated_at value from the previous synchronization. So, if the two new records have updated_at values greater than the last synced value, only those two will be synced. If one of them has the same updated_at as the last sync, then that record (plus any with a greater value) will be included, potentially resulting in three records being synced (the previous max and the two new ones), but only if there is a duplicate cursor value. This behavior is due to the "inclusive cursor" approach, which can cause the last record from the previous sync to be included again if its cursor value matches the new records' cursor value [Inclusive Cursors](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors).Ameya Bapat
10/13/2025, 6:58 PMAmeya Bapat
10/13/2025, 6:58 PMkapa.ai
10/13/2025, 6:58 PMkapa.ai
10/13/2025, 6:58 PM>= operator will only match records with a cursor value equal to or greater than the last synced value. However, the only time the previous record (with the last synced cursor value) would be included again is if a new record is inserted with the same cursor value as the previous max. In that case, both the old and new records with that cursor value would be included due to the >= condition. To summarize: - If new records have cursor values greater than the last synced value, only the new records are synced. - If a new record has a cursor value equal to the last synced value, the previous record (with that value) will be included again. This behavior is described in the documentation: > "Additionally, you may run into behavior where you see the same row being emitted during each sync. This will occur if your data has not changed and you attempt to run additional syncs, as the cursor field will always be greater than or equal to itself, causing it to pull the latest row multiple times until there is new data at the source." > [Inclusive Cursors](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors) So, if the new records have strictly greater cursor values, only those new records are synced. The previous record is not re-synced in that case.Ameya Bapat
10/13/2025, 7:02 PMkapa.ai
10/13/2025, 7:02 PMAmeya Bapat
10/13/2025, 7:02 PMkapa.ai
10/13/2025, 7:02 PMkapa.ai
10/13/2025, 7:02 PM>= in the incremental sync query does indeed match records where the cursor column value is equal to the last synced max value. This means that, unless new records have a cursor value strictly greater than the last synced value, the record with the previous max cursor value will be included again in the next sync. From the documentation: > "Additionally, you may run into behavior where you see the same row being emitted during each sync. This will occur if your data has not changed and you attempt to run additional syncs, as the cursor field will always be greater than or equal to itself, causing it to pull the latest row multiple times until there is new data at the source." > [Inclusive Cursors](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors) So, to clarify: - If a record exists with a cursor value equal to the last synced max value, and the query uses >=, that record will be included in the next sync. - This is intentional and part of Airbyte's at-least-once delivery guarantee, ensuring no data is missed, even if it results in duplicate records that may need to be deduplicated downstream. If both new records have cursor values strictly greater than the last synced value, only those new records will be included. But if any record (old or new) has a cursor value equal to the last synced value, it will be included due to the >= condition.kapa.ai
10/13/2025, 7:02 PMlast_sync_max_cursor_field_value = 2024-06-01T12:00:00Z #### Two New Records Added Now, two new records are added: | id | name | updated_at | |----|--------|----------------------| | 4 | Dave | 2024-06-01T130000Z | | 5 | Emma | 2024-06-01T140000Z | #### Next Sync Query The incremental sync will run: sql SELECT * FROM table WHERE updated_at >= '2024-06-01T12:00:00Z' Records in the table: | id | name | updated_at | |----|-------|----------------------| | 3 | Carol | 2024-06-01T120000Z | ← previous max | 4 | Dave | 2024-06-01T130000Z | ← new | 5 | Emma | 2024-06-01T140000Z | ← new Which records will be synced? - If Carol’s record (id 3) was already synced in the previous run, and no new record has updated_at = 2024-06-01T12:00:00Z, only Dave and Emma (the two new records) will be synced. - The previous record (Carol) will not be re-synced, because her record is not new and has already been processed. Conclusion: Only the two new records will be synced in this case, not three, because their updated_at values are strictly greater than the last synced value. The previous record is not re-synced unless a new record shares the same cursor value as the previous max [see documentation](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors). If you have further questions or want to see what happens with duplicate cursor values, let me know!Ameya Bapat
10/13/2025, 7:10 PMkapa.ai
10/13/2025, 7:10 PMkapa.ai
10/13/2025, 7:10 PMupdated_at value (which is equal to the last synced max cursor value), then both records will be included in the next sync due to the use of the >= operator in the incremental sync query. This means that the record with the previous max cursor value (Carol) will be re-synced, and the new record (Emma) with the same cursor value will also be synced. This behavior is explicitly described in the Airbyte documentation: > "Additionally, you may run into behavior where you see the same row being emitted during each sync. This will occur if your data has not changed and you attempt to run additional syncs, as the cursor field will always be greater than or equal to itself, causing it to pull the latest row multiple times until there is new data at the source." > [Inclusive Cursors](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors) So, in your scenario, if both Emma and Carol have updated_at = 2024-06-01T12:00:00Z, and that is the last synced max cursor value, both records will be included in the next sync. This is part of Airbyte's at-least-once delivery guarantee and is expected behavior.Ameya Bapat
10/13/2025, 7:15 PMkapa.ai
10/13/2025, 7:15 PMkapa.ai
10/13/2025, 7:16 PMupdated_at as the cursor field. ### Initial Table Content (before first sync): | id | name | updated_at | |----|-------|----------------------| | 1 | Alice | 2024-06-01T100000Z | | 2 | Bob | 2024-06-01T120000Z | | 3 | Carol | 2024-06-01T120000Z | #### First Sync - The first sync acts as a full refresh, so all records are synced: - Alice (2024-06-01T10:00:00Z) - Bob (2024-06-01T12:00:00Z) - Carol (2024-06-01T12:00:00Z) - The max cursor value after this sync is 2024-06-01T12:00:00Z (from Bob and Carol). --- ### After Adding Two New Records: | id | name | updated_at | |----|--------|----------------------| | 4 | Dave | 2024-06-01T130000Z | | 5 | Emma | 2024-06-01T140000Z | #### Second Sync - The incremental sync will run a query like: sql SELECT * FROM table WHERE updated_at >= '2024-06-01T12:00:00Z' - This query will match: - Bob (2024-06-01T12:00:00Z) - Carol (2024-06-01T12:00:00Z) - Dave (2024-06-01T13:00:00Z) - Emma (2024-06-01T14:00:00Z) However, since Bob and Carol were already synced in the previous run and have not changed, only the new records with updated cursor values (Dave and Emma) are considered new for the destination. But, due to the use of >=, if the sync logic does not track which records have already been processed for a given cursor value, Bob and Carol could be re-synced. This is a known behavior in Airbyte's incremental append mode, especially when multiple records share the same cursor value as the last sync's max value ([see documentation](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors)). > "Additionally, you may run into behavior where you see the same row being emitted during each sync. This will occur if your data has not changed and you attempt to run additional syncs, as the cursor field will always be greater than or equal to itself, causing it to pull the latest row multiple times until there is new data at the source." So, in the second sync, the following records will be emitted: - Bob (2024-06-01T12:00:00Z) - Carol (2024-06-01T12:00:00Z) - Dave (2024-06-01T13:00:00Z) - Emma (2024-06-01T14:00:00Z) Summary Table: | Sync # | Records Synced | |--------|-------------------------------------------------------------------------------| | 1 | Alice, Bob, Carol | | 2 | Bob, Carol, Dave, Emma | This is expected behavior due to the inclusive cursor (>=) approach in Airbyte's incremental append mode ([source](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors)). Deduplication downstream is recommended if you want to avoid processing the same records multiple times.Ameya Bapat
10/13/2025, 7:18 PMkapa.ai
10/13/2025, 7:18 PMkapa.ai
10/13/2025, 7:18 PM>= operator [see Inclusive Cursors](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors). In summary: - Airbyte tracks only the maximum cursor value, not all records with that value. - The number of records with the max cursor value is not tracked. - This can lead to re-syncing of records with the same cursor value in subsequent syncs. If you need to avoid re-processing such records, deduplication should be handled downstream.Ameya Bapat
10/13/2025, 7:23 PMkapa.ai
10/13/2025, 7:23 PMkapa.ai
10/13/2025, 7:24 PMupdated_at value equal to or greater than the last synced max cursor value. Given your example: Initial state after first sync: | id | name | updated_at | |----|-------|----------------------| | 1 | Alice | 2024-06-01T100000Z | | 2 | Bob | 2024-06-01T110000Z | | 3 | Carol | 2024-06-01T120000Z | After first sync, new records added: | id | name | updated_at | |----|--------|----------------------| | 4 | Dave | 2024-06-01T130000Z | | 5 | Emma | 2024-06-01T140000Z | The last synced max cursor value is 2024-06-01T12:00:00Z (Carol). The next sync will run: sql SELECT * FROM table WHERE updated_at >= '2024-06-01T12:00:00Z' So, it will include: - Carol (2024-06-01T12:00:00Z) - Dave (2024-06-01T13:00:00Z) - Emma (2024-06-01T14:00:00Z) Bob will not be included because his updated_at is 2024-06-01T11:00:00Z, which is less than the last max. This matches the documented behavior that Airbyte only tracks the max cursor value, and all records with that value or higher will be included in the next sync, potentially resulting in re-syncing records with the same cursor value as the previous max [see Inclusive Cursors](https://docs.airbyte.com/platform/using-airbyte/core-concepts/sync-modes/incremental-append#inclusive-cursors).