partition_router: type: ListPartitionRou...
# ask-ai
h
partition_router: type: ListPartitionRouter cursor_field: "ou" values: - "wqURG81DbhS" - "TQZa6RHFdsh" request_option: type: RequestOption field_name: "ou" inject_into: "request_parameter" type: ListPartitionRouter cursor_field: "dx" values: - "EM02m2HPZG6" - "PePmfAnKV3c" request_option: type: RequestOption field_name: "dx" inject_into: "request_parameter" this has error how to fix it
k
Your YAML is invalid because you are specifying two separate objects with the same key (
type: ListPartitionRouter
) at the same level, which is not allowed in YAML. To define multiple partition routers, you need to use a list (array) under the
partition_router
key. Each partition router should be an item in that list. Here is the correct way to define multiple
ListPartitionRouter
objects:
Copy code
yaml partition_router:   - type: ListPartitionRouter     cursor_field: "ou"     values:       - "wqURG81DbhS"       - "TQZa6RHFdsh"     request_option:       type: RequestOption       field_name: "ou"       inject_into: "request_parameter"   - type: ListPartitionRouter     cursor_field: "dx"     values:       - "EM02m2HPZG6"       - "PePmfAnKV3c"     request_option:       type: RequestOption       field_name: "dx"       inject_into: "request_parameter"
This structure creates a list of partition routers, and Airbyte will generate requests for all combinations of the
ou
and
dx
values (Cartesian product), as described in the documentation [here](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/partitioning#multiple-partition-routers) and [here](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/partition-router). If you follow this structure, your configuration should work as expected.