Skip to content

Commit

Permalink
[airbyte-cdk]: add condition to check type retriever (#39309)
Browse files Browse the repository at this point in the history
  • Loading branch information
lazebnyi committed Jun 10, 2024
1 parent 86549e8 commit 4e91046
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,11 @@ def create_declarative_stream(self, model: DeclarativeStreamModel, config: Confi

def _merge_stream_slicers(self, model: DeclarativeStreamModel, config: Config) -> Optional[StreamSlicer]:
stream_slicer = None
if hasattr(model.retriever, "partition_router") and model.retriever.partition_router:
if (
hasattr(model.retriever, "partition_router")
and isinstance(model.retriever, SimpleRetrieverModel)
and model.retriever.partition_router
):
stream_slicer_model = model.retriever.partition_router
if isinstance(stream_slicer_model, list):
stream_slicer = CartesianProductStreamSlicer(
Expand Down

0 comments on commit 4e91046

Please sign in to comment.