<@U04S8PLJWMT>, How can we refer schema fields in ...
# ask-ai
k
@kapa.ai, How can we refer schema fields in destination connector, we want to read headers from source instead of from input messages.
k
In Airbyte, the schema fields (such as headers or column names) from the source are made available to the destination connector through the catalog object, not directly from the input messages. Specifically, the destination connector receives a parameter called ConfiguredAirbyteCatalog (in Python) or the equivalent catalog object in Java, which contains the schema information for each stream, including field names and types. When implementing a destination connector, you should refer to the schema fields using this catalog object. The input messages themselves contain the data records, but the schema (headers/fields) is defined in the catalog. Here’s how this works in practice: - The destination’s write function receives the configured catalog as an argument. - You can access the schema (field names, types, etc.) for each stream from this catalog. - Use this schema information to process incoming records, map fields, or generate headers as needed. For example, in Python:
Copy code
python def write(     self, config: Mapping[str, Any], configured_catalog: ConfiguredAirbyteCatalog, input_messages: Iterable[AirbyteMessage] ) -> Iterable[AirbyteMessage]:     # Access schema fields from configured_catalog     for stream in configured_catalog.streams:         field_names = [field.name for field in stream.schema['properties']]         # Use field_names as headers or for mapping
This approach allows you to refer to the schema fields (headers) as defined by the source, rather than inferring them from the data in the input messages themselves. This is the recommended and supported way to access schema information in a destination connector in Airbyte [Creating a Python Destination (DuckDB)](https://airbyte.com/tutorials/creating-duckdb-destination-with-python) [Forum Post: Making Http Request From Java Destination](https://discuss.airbyte.io/t/1366). If you need to convert the JSON schema to another format (e.g., Avro), you can do so using the schema information from the catalog object, as described in the referenced forum post. If you need more specific code examples or details for a particular language, let me know!
k
@kapa.ai 503 Service Temporarily Unavailable
k
A message from kapa.ai
A 503 Service Temporarily Unavailable error in Airbyte typically indicates that one of the core services (such as Temporal, the worker, or the webapp) is not healthy or is overloaded. This can prevent syncs, connection tests, or other operations from running. Here are some common causes and troubleshooting steps based on the knowledge sources: ### Common Causes - Resource Exhaustion: If your Airbyte deployment does not have enough CPU or memory, services like Temporal may become unresponsive, leading to 503 errors. This is especially common in local or low-resource environments [Quickstart: Run Airbyte](https://docs.airbyte.com/platform/using-airbyte/getting-started/oss-quickstart#part-3-run-airbyte). - Temporal Service Issues: If the Temporal service is stuck, overloaded, or rate-limited, Airbyte jobs (syncs, connection checks) will not start, and you may see 502/503 errors in the UI [Self-hosted Airbyte in Docker stuck and will not trigger sync](https://github.com/airbytehq/airbyte/issues/44833). - Readiness Probe Failures: During installation, you might see
Readiness probe failed: HTTP probe failed with statuscode: 503
. This can often be resolved by allocating more resources and allowing the installation to complete [Quickstart: Run Airbyte](https://docs.airbyte.com/platform/using-airbyte/getting-started/oss-quickstart#part-3-run-airbyte). - Networking or Ingress Misconfiguration: In Kubernetes deployments, incorrect routing of API requests can result in 503 or 404 errors if services are not properly exposed [Critical Bug in v1.7.1: Connector Builder is broken due to frontend calling a non-existent API endpoint (404 Not Found)](https://github.com/airbytehq/airbyte/issues/63770). ### Troubleshooting Steps 1. Check Resource Allocation: Ensure your deployment meets the [suggested resource requirements](https://docs.airbyte.com/platform/using-airbyte/getting-started/oss-quickstart#suggested-resources). If you see 503 errors during install, try increasing CPU/memory. 2. Inspect Service Health: Use
docker ps
(for Docker) or
kubectl get pods
(for Kubernetes) to check if all Airbyte services are running and healthy. 3. Review Logs: Look at the logs for the Temporal, worker, and webapp containers/pods for errors or warnings. 4. Check for Rate Limiting: If you see errors about "service rate limit exceeded" in Temporal logs, your instance may be overloaded and need more resources or a restart [Self-hosted Airbyte in Docker stuck and will not trigger sync](https://github.com/airbytehq/airbyte/issues/44833). 5. Kubernetes Ingress: If using Kubernetes, verify your Ingress rules are correctly routing traffic to the appropriate services [Critical Bug in v1.7.1: Connector Builder is broken due to frontend calling a non-existent API endpoint (404 Not Found)](https://github.com/airbytehq/airbyte/issues/63770). If the problem persists after these checks, please provide logs from the affected services for more targeted troubleshooting. --- If you need more specific help, please share details about your deployment (Docker/Kubernetes, resource allocation, and relevant logs).
k
@kapa.ai which component causes 503 Service Temporarily Unavailable error. We tried to updated resources limits and facing this error, even after rollback changes its same issue.
@kapa.ai which component causes 503 Service Temporarily Unavailable error. We tried to updated resources limits and facing this error, even after rollback changes its same issue.
k
A message from kapa.ai
The 503 Service Temporarily Unavailable error in Airbyte is most commonly caused by one or more of the core backend services (such as Temporal, the worker, or the webapp) being unhealthy, overloaded, or not ready. Based on the knowledge sources, the following points are relevant: - Temporal Service Issues: Multiple reports indicate that when the Temporal service is overloaded, stuck, or rate-limited, Airbyte jobs cannot be triggered, and the UI/API returns 502 or 503 errors. For example, if Temporal logs show errors like
service rate limit exceeded
or
RESOURCE_EXHAUSTED
, this can result in Airbyte being unavailable via the UI or API, and 503 errors are observed ([Self-hosted Airbyte in Docker stuck and will not trigger sync](https://github.com/airbytehq/airbyte/issues/44833), [Airbyte not responding via UI or API](https://github.com/airbytehq/airbyte/issues/46554)). - Resource Limit Changes: If you recently updated resource limits and started seeing 503 errors, it is likely that one or more services (especially Temporal) are not starting correctly or are failing readiness checks. Even after rolling back, the service may remain in a bad state if, for example, the Temporal database is overloaded or the pods/containers are not properly restarted ([Unable to install airbyte 1.0](https://github.com/airbytehq/airbyte/issues/46290)). - Readiness Probe Failures: During installation or after resource changes, you may see repeated readiness probe failures with status code 503, indicating that the service (often the workload launcher or webapp) is not healthy or not able to serve requests ([Unable to install airbyte 1.0](https://github.com/airbytehq/airbyte/issues/46290)). In summary: The component most often responsible for persistent 503 errors after resource changes is the Temporal service. If Temporal is not healthy, overloaded, or misconfigured, Airbyte will not be able to process jobs, and the UI/API will return 503 errors. This can persist even after rolling back resource changes if the underlying issue (such as a stuck Temporal database or uncleaned pods) is not resolved. If you continue to see 503 errors after a rollback, check the logs for the Temporal service and ensure all Airbyte services are running and healthy. You may need to restart the affected pods/containers or, in some cases, clean up the Temporal database if it has grown too large or is in a bad state ([Self-hosted Airbyte in Docker stuck and will not trigger sync](https://github.com/airbytehq/airbyte/issues/44833), [Airbyte not responding via UI or API](https://github.com/airbytehq/airbyte/issues/46554)). If you need more targeted help, please provide logs from the Temporal and webapp services.