From 718da45cb903643c8eacf9b661d44b0c71619033 Mon Sep 17 00:00:00 2001 From: "maxime.c" Date: Tue, 14 Oct 2025 09:50:51 -0400 Subject: [PATCH] fix parent state cursor fallback --- .../sources/declarative/parsers/model_to_component_factory.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py b/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py index f58aa30e5..b674b5f90 100644 --- a/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +++ b/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py @@ -3865,7 +3865,9 @@ def _instantiate_parent_stream_state_manager( if not parent_state and not isinstance(parent_state, dict): cursor_values = child_state.values() - if cursor_values: + if cursor_values and len(cursor_values) == 1: + # We assume the child state is a pair `{: }` and we will use the + # cursor value as a parent state. incremental_sync_model: Union[ DatetimeBasedCursorModel, IncrementingCountCursorModel,