Hi <@U04S8PLJWMT> i had a incremental stream in a ...
# replication-ask-ai
i
Hi @kapa.ai i had a incremental stream in a connection that was huge. By mistake i switched it off and now when i switched it back on, i lost its connection state. is there a way i can restore that state of the stream, i can' re-sync the entire thing - its too huge.
k
You can only restore the previous incremental state if you still have a copy of it somewhere (for example from another connection, or from a backup / export). Airbyte itself does not automatically keep historical versions of connection state in the UI. Here are the options the docs describe: 1. If you have another connection with the same source/streams and correct state You can copy its state JSON and paste it into your current connection: ◦ Go to the “good” connection → Settings → Advanced → copy the Connection State JSON. [Manage state] ◦ Go to your current connection → Settings → Advanced → paste that JSON → click Update state. [Manage state] This is the same mechanism used when upgrading connections one by one without re‑syncing historical data. [Dest V2 incremental] 2. If you manually know the correct cursor value(s) You can also directly edit the connection state JSON to set the cursor (e.g. a timestamp or ID) to where you want the next incremental sync to start: ◦ Open Settings → Advanced → Connection State for that connection. ◦ Edit the JSON to the desired cursor value(s). ◦ Click Update state to save. [Manage state] This lets you backfill from a specific point in time without a full reset, but must be done with extreme care because a wrong state can break syncs or require a full historical re‑sync. [Manage state] 3. If you have no backup and don’t know the cursor The documentation does not describe any built‑in way to “recover” a lost state automatically in this situation. I’m sorry, but there’s no information about a state history or undo feature; the only documented path is to set the state manually as above or perform a full re‑sync. [Manage state] If you can share what your cursor field is (e.g.
updated_at
or an ID) and roughly where you want to resume from, I can help you sketch what the state JSON should look like so you can paste it into the connection. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
i
@kapa.ai whats the field cursor_record_count mean in the streamState ?
k
I’m sorry, but the provided knowledge sources do not mention a
cursor_record_count
field in
streamState
(or in connection/stream state in general), so I can’t give a documented definition for it. The docs only describe, at a high level, that incremental sync state stores cursor values (like
updated_at
timestamps or similar) and that a state message is emitted and then reused to determine the next set of records to read, but they do not enumerate or explain any
cursor_record_count
attribute. [Incremental syncs YAML; Incremental streams CDK] Given this, I can’t reliably say what
cursor_record_count
means or how it’s used internally. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
i
Hi @kapa.ai can i change sync mode from incremental + append/dedup to incremental + append. Would i need to re-sync ?
k
You can change sync mode in the connection settings as long as both the source and destination support the target mode (Incremental | Append is a standard supported mode). [Sync modes; Incremental Append; Incremental Append Deduped] However, the knowledge sources do not explicitly state what happens to existing data or state when you switch from Incremental | Append + Deduped to Incremental | Append, nor whether a full re‑sync is automatically required. What is documented: • Incremental | Append: ◦ Only new/modified data is read. ◦ Destination records are never deleted or mutated; new copies are appended. [Incremental Append] • Incremental | Append + Deduped: ◦ Only new/modified data is read. ◦ Raw/history tables keep all versions, and a final table is de‑duplicated by primary key using the cursor. [Incremental Append Deduped] • Connection state (cursors) can be manually edited to avoid re‑syncing historical data, and this is the documented way to continue incremental syncs without a full reset when changing connections. [Manage state; Dest V2 incremental] Because the docs don’t clearly describe the exact behavior when switching between these two incremental modes on an existing connection, I can’t guarantee whether a re‑sync will be enforced in your specific case. To minimize re‑syncing while changing modes, the documented safe pattern is: 1. Keep your existing connection as is. 2. Create a new connection with the desired mode (Incremental | Append). 3. Copy the connection state JSON from the old connection and paste it into the new one under Settings → Advanced → Connection State, then click Update state. [Manage state; Dest V2 incremental] 4. Start syncing on the new connection so it continues incrementally from the same point without re‑syncing all history. If you need an exact guarantee for your current connection (no duplicate data, no enforced reset), I’d recommend testing this on a non‑production copy of the connection or confirming with Airbyte support, since the behavior of changing modes mid‑stream is not explicitly documented in the provided sources. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.