Skip to content

Commit b9e26bd

Browse files
updated simple retriever
1 parent 2d4fdae commit b9e26bd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

airbyte_cdk/sources/declarative/retrievers/simple_retriever.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585
from airbyte_cdk.sources.streams.core import StreamData
8686
from airbyte_cdk.sources.types import Config, Record, StreamSlice, StreamState
8787
from airbyte_cdk.utils.mapping_helpers import combine_mappings
88+
from airbyte_cdk.sources.streams.concurrent.cursor import Cursor
89+
8890

8991
FULL_REFRESH_SYNC_COMPLETE_KEY = "__ab_full_refresh_sync_complete"
9092

@@ -187,7 +189,7 @@ def resolve_dependencies(
187189
primary_key: Optional[Union[str, List[str], List[List[str]]]] = None,
188190
stream_slicer: Optional[StreamSlicer] = None,
189191
request_options_provider: Optional[RequestOptionsProvider] = None,
190-
stop_condition_on_cursor: bool = False,
192+
stop_condition_cursor: Optional[Cursor] = None,
191193
client_side_incremental_sync: Optional[Dict[str, Any]] = None,
192194
transformations: Optional[List[RecordTransformation]] = None,
193195
file_uploader: Optional[DefaultFileUploader] = None,
@@ -356,15 +358,14 @@ def _get_log_formatter(
356358
),
357359
)
358360

359-
cursor_used_for_stop_condition = cursor if stop_condition_on_cursor else None
360361
paginator = (
361362
dependency_constructor(
362363
model=model.paginator,
363364
config=config,
364365
url_base=_get_url(),
365366
extractor_model=model.record_selector.extractor,
366367
decoder=decoder,
367-
cursor_used_for_stop_condition=cursor_used_for_stop_condition,
368+
cursor_used_for_stop_condition=stop_condition_cursor or None,
368369
)
369370
if model.paginator
370371
else NoPagination(parameters={})

0 commit comments

Comments
 (0)