Skip to content

Commit 8158f0d

Browse files
authored
fix: parent state cursor fallback (#789)
1 parent 035264c commit 8158f0d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3865,7 +3865,9 @@ def _instantiate_parent_stream_state_manager(
38653865

38663866
if not parent_state and not isinstance(parent_state, dict):
38673867
cursor_values = child_state.values()
3868-
if cursor_values:
3868+
if cursor_values and len(cursor_values) == 1:
3869+
# We assume the child state is a pair `{<cursor_field>: <cursor_value>}` and we will use the
3870+
# cursor value as a parent state.
38693871
incremental_sync_model: Union[
38703872
DatetimeBasedCursorModel,
38713873
IncrementingCountCursorModel,

0 commit comments

Comments
 (0)