Skip to content

Commit cab392e

Browse files
authored
fix(low-code cdk): fix partition router validation for async retriever (#421)
1 parent 591a079 commit cab392e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,6 +1904,8 @@ def _merge_stream_slicers(
19041904
) -> Optional[StreamSlicer]:
19051905
retriever_model = model.retriever
19061906

1907+
stream_slicer = self._build_stream_slicer_from_partition_router(retriever_model, config)
1908+
19071909
if retriever_model.type == "AsyncRetriever":
19081910
is_not_datetime_cursor = (
19091911
model.incremental_sync.type != "DatetimeBasedCursor"
@@ -1923,13 +1925,11 @@ def _merge_stream_slicers(
19231925
"AsyncRetriever with cursor other than DatetimeBasedCursor is not supported yet."
19241926
)
19251927

1926-
if is_partition_router:
1928+
if is_partition_router and not stream_slicer:
19271929
# Note that this development is also done in parallel to the per partition development which once merged
19281930
# we could support here by calling create_concurrent_cursor_from_perpartition_cursor
19291931
raise ValueError("Per partition state is not supported yet for AsyncRetriever.")
19301932

1931-
stream_slicer = self._build_stream_slicer_from_partition_router(retriever_model, config)
1932-
19331933
if model.incremental_sync:
19341934
return self._build_incremental_cursor(model, stream_slicer, config)
19351935

0 commit comments

Comments
 (0)