hiwot tadese
10/07/2025, 12:54 PMkapa.ai
10/07/2025, 12:54 PMpe (period) partition dynamic so you don't have to manually update the list each year. Instead of using a static list in the ListPartitionRouter, you can use a dynamic partitioning approach by leveraging the Substream Partition Router (sometimes called "Parent Stream" in the UI) if your API provides an endpoint that returns available periods, or you can allow the user to provide the list via configuration. ### Options for Dynamic Partitioning #### 1. User-Configurable Partition Values You can let the user specify the periods (pe) as an array input in the connector configuration. This way, you don't need to update the connector code for new years—users can simply provide the periods they want to sync. How to configure: - In the ListPartitionRouter for pe, set values to reference a user input, e.g., {{ config['periods'] }}. - In your spec, add a property for periods as an array. Example: yaml partition_router: - type: ListPartitionRouter values: "{{ config['periods'] }}" cursor_field: pe And in your `spec`: yaml properties: periods: type: array items: type: string title: Periods description: List of periods to sync (e.g., ["201901", "201902", ...]) This approach is described in the documentation for static partitioning with user input, which allows the end user to control which partitions to fetch without code changes [Dynamic and static partitioning](https://docs.airbyte.com/platform/1.7/connector-development/connector-builder-ui/partitioning#dynamic-and-static-partitioning). #### 2. Dynamic Partitioning from API (Parent Stream) If your API provides an endpoint that lists available periods, you can configure a Parent Stream (Substream Partition Router) to fetch the list of periods dynamically. This way, the connector will always use the latest available periods from the API. - Configure a parent stream that fetches the list of periods. - Use the parent stream's output as the partition values for pe. This is the recommended approach for truly dynamic partitioning and is described in the documentation as the "dynamic" form of partitioning [Parent Stream](https://docs.airbyte.com/platform/1.7/connector-development/connector-builder-ui/partitioning#parent-stream). --- Summary: - For user-configurable static partitions, use a config reference in your ListPartitionRouter values. - For fully dynamic partitions, use a Parent Stream/Substream Partition Router if your API supports it. If your API does not provide a list of periods, the user-configurable approach is the best available option without custom code. > The knowledge sources do not mention a built-in way for the ListPartitionRouter to generate date ranges programmatically (e.g., by specifying a start and end year/month), so either user input or a dynamic parent stream is required for dynamic behavior. References: - [Dynamic and static partitioning](https://docs.airbyte.com/platform/1.7/connector-development/connector-builder-ui/partitioning#dynamic-and-static-partitioning) - [Parent Stream](https://docs.airbyte.com/platform/1.7/connector-development/connector-builder-ui/partitioning#parent-stream) - [Partition Router Types](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/partitioning#partition-router-types)