File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
airbyte_cdk/sources/declarative/retrievers Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 77from collections import defaultdict
88from dataclasses import InitVar , dataclass , field
99from functools import partial
10- from itertools import islice
1110from typing import (
1211 Any ,
1312 Callable ,
4443from airbyte_cdk .sources .declarative .retrievers .retriever import Retriever
4544from airbyte_cdk .sources .declarative .stream_slicers .stream_slicer import StreamSlicer
4645from airbyte_cdk .sources .source import ExperimentalClassWarning
46+ from airbyte_cdk .sources .streams .concurrent .cursor import Cursor
4747from airbyte_cdk .sources .streams .core import StreamData
4848from airbyte_cdk .sources .streams .http .pagination_reset_exception import (
4949 PaginationResetRequiredException ,
@@ -103,6 +103,9 @@ class SimpleRetriever(Retriever):
103103 )
104104
105105 def __post_init__ (self , parameters : Mapping [str , Any ]) -> None :
106+ # while changing `ModelToComponentFactory.create_simple_retriever` to accept a cursor, the sources implementing
107+ # a CustomRetriever inheriting for SimpleRetriever needed to have the following validation added.
108+ self .cursor = None if isinstance (self .cursor , Cursor ) else self .cursor
106109 self ._paginator = self .paginator or NoPagination (parameters = parameters )
107110 self ._parameters = parameters
108111 self ._name = (
You can’t perform that action at this time.
0 commit comments