hiwot tadese
09/29/2025, 7:12 PMkapa.ai
09/29/2025, 7:13 PMrequest_parameters in your requester are set to static, comma-separated values, rather than using the partition router to generate separate requests for each combination of ou and dx. To achieve partitioning, you should remove the static request_parameters for dx and ou from the requester and let the ListPartitionRouter inject these values dynamically. The partition routers will then generate requests for each combination of ou and dx as separate API calls. How to fix: 1. Remove the static dx and ou from request_parameters in your requester. 2. Keep the partition_router configuration as you have it, since it is correct for generating the Cartesian product of ou and dx values. 3. The request_option in each ListPartitionRouter will inject the current partition value into the request parameters. Example configuration: yaml definitions: streams: indicator_values: type: DeclarativeStream name: indicator_values retriever: type: SimpleRetriever decoder: type: JsonDecoder requester: $ref: "#/definitions/base_requester" path: https://***.***.gov.et/api/analytics http_method: GET request_parameters: dimension: pe:201701;201702;201703;201704 # Only static parameter here record_selector: type: RecordSelector extractor: type: DpathExtractor field_path: [] 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 With this setup, Airbyte will generate requests like: GET https://***.***.gov.et/api/analytics?dimension=pe:201701;201702;201703;201704&ou=wqURG81DbhS&dx=EM02m2HPZG6 GET https://***.***.gov.et/api/analytics?dimension=pe:201701;201702;201703;201704&ou=wqURG81DbhS&dx=PePmfAnKV3c GET https://***.***.gov.et/api/analytics?dimension=pe:201701;201702;201703;201704&ou=TQZa6RHFdsh&dx=EM02m2HPZG6 GET https://***.***.gov.et/api/analytics?dimension=pe:201701;201702;201703;201704&ou=TQZa6RHFdsh&dx=PePmfAnKV3c This approach is supported and documented in Airbyte's partition router documentation, where each partition router iterates over its values and injects them into the request, and multiple routers result in a Cartesian product of all values, generating all combinations as separate requests [Retrieving Records Spread Across Partitions](https://docs.airbyte.com/platform/1.7/connector-development/config-based/understanding-the-yaml-file/partition-router) | [ListPartitionRouter](https://docs.airbyte.com/platform/1.7/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/ListPartitionRouter). If you need to inject the partition values into a different part of the request (e.g., path or header), adjust the inject_into field in the request_option accordingly. Summary: Remove static dx and ou from request_parameters and rely on the partition routers to inject these values dynamically. This will achieve the desired partitioning behavior.hiwot tadese
09/29/2025, 7:36 PMkapa.ai
09/29/2025, 7:36 PMkapa.ai
09/29/2025, 7:37 PMpe (period) parameter dynamic in the same way as ou and dx, you should add another ListPartitionRouter for pe in your partition_router configuration. This router will iterate over your list of periods and inject each value into the request as a parameter, just like you do for ou and dx. Example configuration: 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 - type: ListPartitionRouter cursor_field: pe values: - 201701 - 201702 - 201703 - 201704 request_option: type: RequestOption field_name: pe inject_into: request_parameter If you want to generate the list of periods programmatically (e.g., using Python), you would do that outside of the YAML and then paste the resulting list into the values field for pe. Result: Airbyte will generate all combinations of ou, dx, and pe as separate requests, just as it does for the other parameters. This is the documented approach for dynamic partitioning using multiple ListPartitionRouter components [Retrieving Records Spread Across Partitions](https://docs.airbyte.com/platform/1.7/connector-development/config-based/understanding-the-yaml-file/partition-router) | [ListPartitionRouter](https://docs.airbyte.com/platform/1.7/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/ListPartitionRouter). Note: You cannot use Python code directly in the YAML, but you can generate the list of periods in Python and then copy the output into your YAML configuration. If you want the user to provide the periods dynamically, you can use a user input reference (e.g., {{ config['periods'] }}) in the values field, as described in the documentation. Let me know if you need an example for user-configurable periods!hiwot tadese
09/29/2025, 7:38 PMvalues field for pe.
can you explain thiskapa.ai
09/29/2025, 7:38 PMkapa.ai
09/29/2025, 7:39 PMpython start_year = 2017 end_year = 2017 start_month = 1 end_month = 4 periods = [f"{year}{month:02d}" for year in range(start_year, end_year + 1) for month in range(start_month, end_month + 1)] print(periods) This will output: ['201701', '201702', '201703', '201704'] 2. Copy the output list and paste it into your Airbyte YAML: yaml - type: ListPartitionRouter cursor_field: pe values: - 201701 - 201702 - 201703 - 201704 request_option: type: RequestOption field_name: pe inject_into: request_parameter This approach is necessary because Airbyte's declarative YAML does not support dynamic code execution; all dynamic lists must be generated externally and then included as static values in the configuration [see documentation](https://docs.airbyte.com/platform/1.7/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/ListPartitionRouter). If you want the list to be user-configurable at runtime, you can use a config variable (e.g., {{ config['periods'] }}) and have the user provide the list in the connector's configuration UI instead. Let me know if you need an example for user-configurable values!