hiwot tadese
10/04/2025, 8:35 AMkapa.ai
10/04/2025, 8:36 AMperiods) of type array. This allows you (or end users) to specify the list of periods in the Airbyte UI or configuration file. 2. Reference the User Input in the Partition Router: Set the values field to reference the user input using Jinja templating. Example: yaml - type: ListPartitionRouter values: "{{ config['periods'] }}" cursor_field: pe - In your connector configuration, define periods as an array: json { "periods": [ "201701", "201702", "201703", "201704", "201705", "201706", "201707", "201708", "201709", "201710", "201711", "201712", "201801", "201802", "201803" ] } This approach makes it easy to add new years and months—just update the periods array in your configuration, no code changes required. This is the recommended pattern in Airbyte for static partitioning when the set of partitions may change over time or needs to be user-configurable [Partition Router Types](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/partitioning#partition-router-types). If you want even more flexibility, you could generate the list of periods programmatically outside of Airbyte and pass it in as configuration. Summary: Switch from hardcoding the list in the YAML to referencing a user input array. This is more maintainable and user-friendly for adding new periods in the future.hiwot tadese
10/04/2025, 9:00 AMkapa.ai
10/04/2025, 9:00 AMkapa.ai
10/04/2025, 9:00 AM"201701", "201702", ..., "201712", "201801", etc.). How to do it: 1. Create a user input: - In the Connector Builder UI, add a new user input. - Name it (for example) periods. - Set its type to array. 2. Enter the values: - In the configuration or when setting up the source, provide the list of year-month strings you want to use, such as: [ "201701", "201702", "201703", "201704", "201705", "201706", "201707", "201708", "201709", "201710", "201711", "201712", "201801", "201802", "201803" ] 3. Reference the user input in your partition router: yaml - type: ListPartitionRouter values: "{{ config['periods'] }}" cursor_field: pe This way, you can easily add more years and months by simply updating the periods array in the user input, without changing the connector code. This approach is recommended for maintainability and flexibility [Partition Router Types](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/partitioning#partition-router-types). If you need to add more periods, just add more "YYYYMM" strings to the array in the user input.hiwot tadese
10/04/2025, 9:05 AMThe value must match the pattern {{ config['user_input_id'] }} after i added as an array, how to fix itkapa.ai
10/04/2025, 9:05 AMkapa.ai
10/04/2025, 9:05 AMThe value must match the pattern {{ config['user_input_id'] }} suggests that the Connector Builder is expecting a specific pattern or format for the user input, but the input provided does not match it. This often happens if the user input is not correctly set as an array, or if the connector spec or UI is expecting a string instead of an array. How to fix it: 1. Ensure the user input is set to type `array`: - When creating the user input in the Connector Builder UI, make sure you select array as the type, not string. 2. Reference the user input correctly in your partition router: - In your YAML, use: yaml values: "{{ config['periods'] }}" where periods is the name of your user input. 3. Check the connector spec (spec.yaml): - The field for your user input should look like this: yaml periods: type: array title: Periods description: List of year-month strings (e.g., 201701, 201702, ...) items: type: string 4. Input the array correctly in the UI or config: - When configuring the source, enter the periods as an array, for example: [ "201701", "201702", "201703", "201704", "201705", "201706" ] If you still see the pattern error: - Double-check that you are not setting a pattern property on the array field in your spec. The pattern property is only valid for strings, not arrays. If you have a pattern on the array field, remove it. Summary: Make sure your user input is of type array, your spec does not have a pattern on the array field, and you reference it as {{ config['periods'] }} in your partition router. This should resolve the pattern error and allow you to use an array of year-month strings as input [Partition Router Types](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/partitioning#partition-router-types). If you follow these steps and still encounter issues, please share your spec and configuration for further troubleshooting.