Kiet Luu (Ken)
08/15/2025, 6:12 PMkapa.ai
08/15/2025, 6:12 PMyaml error_handler: response_filters: - action: RETRY http_codes: - 500 - 502 - 503 - 504 # Example backoff strategy (can be exponential, constant, etc.) backoff_strategies: - type: ExponentialBackoffStrategy initial_wait_seconds: 1 max_wait_seconds: 60 multiplier: 2 - This configuration will retry requests that receive a 500 error, using an exponential backoff, up to a reasonable limit (typically 3-5 attempts for server errors) [Common Error Handling Patterns](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/error-handling#common-error-handling-patterns). ### 2. Rate Limiting (API Budget) If your API returns 500 when the rate limit is exceeded (which is unusual—most APIs use 429), you can still treat 500 as a rate limit hit in your configuration: yaml api_budget: type: "HTTPAPIBudget" ratelimit_reset_header: "X-RateLimit-Reset" ratelimit_remaining_header: "X-RateLimit-Remaining" status_codes_for_ratelimit_hit: [500] policies: - type: "FixedWindowCallRatePolicy" period: "PT1H" call_limit: 1000 matchers: - method: "GET" url_base: "https://api.example.com" url_path_pattern: "^/users" - Here, status_codes_for_ratelimit_hit includes 500, so Airbyte will treat 500 as a rate limit event and apply the configured rate limiting logic [Rate limiting (API Budget)](https://docs.airbyte.com/platform/next/connector-development/config-based/understanding-the-yaml-file/rate-limit-api-budget). ### 3. Example Error Handler in YAML You can also configure a custom error handler in the YAML builder to retry on 500 errors: yaml error_handler: response_filters: - action: RETRY http_codes: - 500 backoff_strategies: - type: ConstantBackoffStrategy backoff_time_in_seconds: 60 - This will retry on 500 errors with a constant 60-second delay [GitHub Issue Example](https://github.com/airbytehq/airbyte/issues/42928). --- Note: - Most APIs use 429 for rate limit exceeded, not 500. If your API uses 500 for rate limiting, you must explicitly include 500 in both your error handler and status_codes_for_ratelimit_hit. - Always test your configuration to ensure it matches your API’s actual behavior. If you need more advanced handling (e.g., custom backoff logic), you can implement a custom error handler class as described in the docs [Advanced Error Handling Configuration](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/error-handling#advanced-error-handling-configuration). If you need further clarification or a specific example for your use case, please provide more details about your API and connector setup.Kiet Luu (Ken)
08/15/2025, 6:15 PMkapa.ai
08/15/2025, 6:15 PMkapa.ai
08/15/2025, 6:16 PMtasks stream in your YAML configuration: ### How Partitioning Works - The tasks stream uses a SubstreamPartitionRouter as its partition_router. - The parent_stream_configs points to the projects stream (the first stream in your list). - The parent_key is id (from each project record). - The partition_field is parent_id, which will be used as a variable in the child stream. ### Request Flow 1. Fetch Parent Records: Airbyte first syncs the projects stream, retrieving all project records. Each project record has an id. 2. Partitioning: For each project id, a partition (slice) is created for the tasks stream. The value of id from the parent project is assigned to stream_partition['parent_id']. 3. Request Construction: For each partition, the tasks stream sends a GET request to: https://api.ticktick.com/open/v1/project/{{ stream_partition['parent_id'] }}/data Here, {{ stream_partition['parent_id'] }} is replaced with the actual project id from the parent stream. For example, if the projects stream returns three projects with IDs abc, def, and ghi, the following requests will be made: GET https://api.ticktick.com/open/v1/project/abc/data GET https://api.ticktick.com/open/v1/project/def/data GET https://api.ticktick.com/open/v1/project/ghi/data 4. Record Extraction: The response for each request is expected to have a tasks field (as per the field_path: [tasks]), from which task records are extracted. ### Summary - Each project from the projects stream results in one GET request to the tasks endpoint, with the project id substituted into the URL. - This is a classic parent-child (substream) pattern, where the child stream (tasks) is partitioned by the parent stream (projects) using the SubstreamPartitionRouter and ParentStreamConfig settings. This behavior is directly supported by Airbyte’s declarative stream partitioning logic using substreams and is described in the documentation for [SubstreamPartitionRouter](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/partition-router#substreampartitionrouter) and [ParentStreamConfig](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/ParentStreamConfig).Kiet Luu (Ken)
08/15/2025, 6:17 PMkapa.ai
08/15/2025, 6:17 PMkapa.ai
08/15/2025, 6:18 PMConcurrencyLevel configuration in your YAML. This setting determines how many partitions (in your case, project-based task slices) are processed at the same time. For example, if you set a concurrency level of 5, Airbyte will send up to 5 GET requests for different project/task slices in parallel. To control concurrency and avoid exceeding your rate limit: - Use the concurrency_level property in your YAML. You can set a fixed number or make it configurable by the user. For example: yaml concurrency_level: default_concurrency: 5 max_concurrency: 10 This will ensure that no more than 5 (or up to 10, if configured) slices are processed at once. If you want to introduce a delay between requests (to further control the rate), you would need to use rate limiting features or custom error handling, as Airbyte does not natively support a fixed delay between slices in the declarative YAML alone. Important notes: - If you set concurrency_level to 1, only one slice will be processed at a time, but this could cause deadlocks if there are many partitions and dependencies. - For more granular control (like a fixed delay between requests), you would need to implement a custom Python connector and use the CDK’s rate limiting or throttling features, such as MovingWindowCallRatePolicy or similar, which allow you to specify request rates and delays programmatically. This is not available in the declarative YAML alone, but is supported in custom Python connectors [Concurrent](https://docs.airbyte.com/platform/next/connector-development/tutorials/custom-python-connector/concurrency). Summary: Slices (partitions) are processed concurrently, and you can control the number of concurrent requests using the concurrency_level setting in your YAML. For introducing a delay between requests, you need to use custom Python code with rate limiting policies, as declarative YAML does not support per-slice delays directly [ConcurrencyLevel object](https://docs.airbyte.com/platform/next/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/ConcurrencyLevel).Kiet Luu (Ken)
08/15/2025, 6:40 PMkapa.ai
08/15/2025, 6:40 PMkapa.ai
08/15/2025, 6:41 PM{YOUR_USERNAME}/{FEATURE/BUG} (e.g., jdoe/source-stock-api-stream-fix) [Code Contributions](https://docs.airbyte.com/platform/contributing-to-airbyte#code-contributions). 3. Make and Commit Changes: Implement your changes or enhancements to the connector in this new branch. 4. Push and Submit a PR: Push your branch to your forked repository and submit a new Pull Request (PR) to the main Airbyte repository. 5. Link to an Issue: Link your PR to an existing issue (or create a new one if needed). PRs without a linked issue may take longer to review. 6. Follow PR Guidelines: Make sure your PR title and description follow the [Pull Request Handbook](https://docs.airbyte.com/platform/contributing-to-airbyte/resources/pull-requests-handbook). 7. Review and Merge: An Airbyte maintainer will review your PR, trigger CI tests, and provide feedback. Once approved, your changes will be merged. Note: - You do not need access to the original Airbyte server that was used to submit the first PR. All you need is access to your forked GitHub repository. - Do not submit PRs from the master branch of your fork; always use a feature branch [Code Contributions](https://docs.airbyte.com/platform/contributing-to-airbyte#code-contributions). If you need to test your connector locally, you can follow the [developing locally guide](https://docs.airbyte.com/platform/contributing-to-airbyte/developing-locally#connector-contributions), but this does not require the original server—just a local development environment. If you have lost access to your forked repo, you would need to fork the main Airbyte repo again, but since you still have access, you can continue as described above.Kiet Luu (Ken)
08/15/2025, 7:05 PMkapa.ai
08/15/2025, 7:06 PMkapa.ai
08/15/2025, 7:06 PMid is in a specific list, you can add a RecordFilter to the parent stream like this: yaml record_filter: type: RecordFilter condition: "{{ record['id'] not in ['key1', 'key2', 'key3'] }}" This filter will ensure that any parent record with an id of key1, key2, or key3 will be ignored, and thus no partitions will be created for those keys in the child stream. The filter expression can use any available variables and logic as described in the documentation [RecordFilter object](https://docs.airbyte.com/platform/next/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/RecordFilter). Summary: Add a RecordFilter to your parent stream to exclude specific keys, and those partitions will not be created for the substream. If you need to filter based on more complex logic or multiple fields, you can adjust the condition accordingly, using the available variables in the filter context [Record Filter](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/record-processing#record-filter).Kiet Luu (Ken)
08/15/2025, 7:07 PMkapa.ai
08/15/2025, 7:07 PMkapa.ai
08/15/2025, 7:07 PMRecordFilter) is designed to filter records within a stream, not to skip entire partitions based on parent keys at the child stream level. The partitioning logic in SubstreamPartitionRouter will create a partition for every parent record unless the parent itself is filtered out in the parent stream using a `RecordFilter`[RecordFilter object](https://docs.airbyte.com/platform/next/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/RecordFilter). There is no documented way in the provided knowledge sources to filter or skip specific parent partitions only at the child stream level without affecting the parent stream's output. Summary: Based on the current Airbyte declarative YAML capabilities and the documentation, you cannot filter out specific parent partitions only at the child stream level; filtering must be done at the parent stream. If you need this behavior, you may need to implement a custom connector in Python. If you need more advanced partition filtering at the child level, the knowledge sources do not provide a declarative solution for this scenario.Kiet Luu (Ken)
08/15/2025, 7:15 PMkapa.ai
08/15/2025, 7:15 PMKiet Luu (Ken)
08/15/2025, 7:15 PMkapa.ai
08/15/2025, 7:15 PMRecordFilter component is designed to filter records within a stream, not to skip entire partitions based on parent keys at the child stream level. Filtering of parent partitions must be done at the parent stream using a `RecordFilter`—there is no documented way to apply such a filter only at the child stream level without affecting the parent stream's output [RecordFilter object](https://docs.airbyte.com/platform/next/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/RecordFilter). Summary: No, filtering specific parent partitions only at the child stream level is not supported declaratively in Airbyte according to the current documentation. Filtering must be applied at the parent stream if you want to exclude certain partitions from being processed by the child stream.Kiet Luu (Ken)
08/15/2025, 7:16 PM{{ record['closed'] }} is undefinedkapa.ai
08/15/2025, 7:16 PMkapa.ai
08/15/2025, 7:16 PMundefined in filter expressions for Airbyte. The documented way to check if a key is missing or its value is None is to use Python-like expressions such as record.get('closed') is not none or record.get('closed') is none. To filter for only records that do not have the key 'closed', you should use: yaml {{ record.get('closed') is none }} This expression will include only records where the 'closed' key is missing or its value is None [Record Filter](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/record-processing#record-filter). There is no mention in the documentation of using is undefined as a valid syntax. If you use is undefined, it may not work as expected. Summary: Use {{ record.get('closed') is none }} to filter for records that do not have the 'closed' key.