File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
airbyte_cdk/sources/declarative/parsers Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -3059,18 +3059,21 @@ def create_grouping_partition_router(
30593059 if model .group_size < 1 :
30603060 raise ValueError (f"Group size must be greater than 0, got { model .group_size } " )
30613061
3062- if not isinstance (underlying_router , PartitionRouter ):
3063- raise ValueError (
3064- f"Underlying partition router must be a PartitionRouter subclass, got { type (underlying_router )} "
3065- )
3066-
3062+ # Request options in underlying partition routers are not supported for GroupingPartitionRouter
3063+ # because they are specific to individual partitions and cannot be aggregated or handled
3064+ # when grouping, potentially leading to incorrect API calls. Any request customization
3065+ # should be managed at the stream level or through the retriever's configuration.
30673066 if isinstance (underlying_router , SubstreamPartitionRouter ):
30683067 if any (
30693068 parent_config .request_option
30703069 for parent_config in underlying_router .parent_stream_configs
30713070 ):
30723071 raise ValueError ("Request options are not supported for GroupingPartitionRouter." )
30733072
3073+ if isinstance (underlying_router , ListPartitionRouter ):
3074+ if underlying_router .request_option :
3075+ raise ValueError ("Request options are not supported for GroupingPartitionRouter." )
3076+
30743077 return GroupingPartitionRouter (
30753078 group_size = model .group_size ,
30763079 underlying_partition_router = underlying_router ,
You can’t perform that action at this time.
0 commit comments