San Nguyen
10/08/2025, 12:59 AMkapa.ai
10/08/2025, 1:00 AMSan Nguyen
10/08/2025, 1:02 AMkapa.ai
10/08/2025, 1:02 AMkapa.ai
10/08/2025, 1:03 AMSan Nguyen
10/08/2025, 1:06 AMkapa.ai
10/08/2025, 1:06 AMkapa.ai
10/08/2025, 1:07 AM_airbyte_meta.changes key. - For publish destinations, if you cannot log errors using an approved protocol and cannot write data, the destination must fail and raise the error to the user and platform [Error Handling for Destinations](https://docs.airbyte.com/platform/next/connector-development/partner-certified-destinations#error-handling). If you are building a Java destination, use the AirbyteTraceMessageUtility to emit user-friendly error messages: java try { // connector logic } catch (ExceptionIndicatingIncorrectCredentials credErr) { AirbyteTraceMessageUtility.emitConfigErrorTrace( credErr, "Connector failed due to incorrect credentials. Please check your connection credentials."); throw credErr; } catch (ExceptionIndicatingKnownErrorY knownErr) { AirbyteTraceMessageUtility.emitSystemErrorTrace( knownErr, "Connector failed because of reason Y. Please check/do/make ... to resolve this."); throw knownErr; } catch (Exception e) { AirbyteTraceMessageUtility.emitSystemErrorTrace( e, "Connector failed. Possible reasons: ..."); throw e; } - Use emitConfigErrorTrace for user configuration errors (e.g., invalid credentials). - Use emitSystemErrorTrace for all other errors or if unsure [Handling Exceptions in Java Destinations](https://docs.airbyte.com/platform/next/connector-development/tutorials/building-a-java-destination#handling-exceptions). Summary: - For sources, configure error handlers and response filters in the Connector Builder UI or code. - For destinations, log all errors using approved protocols and emit trace messages for user-friendly error reporting. - Never allow silent errors; always surface actionable information to the user.San Nguyen
10/08/2025, 1:15 AMkapa.ai
10/08/2025, 1:15 AMkapa.ai
10/08/2025, 1:15 AMspec.json file that describes the configuration required for your destination. This includes required and optional parameters, supported sync modes, and other capabilities. For example, the DuckDB destination’s spec.json looks like this: json { "documentationUrl": "https://docs.airbyte.io/integrations/destinations/duckdb", "supported_destination_sync_modes": ["overwrite", "append"], "supportsIncremental": true, "supportsDBT": true, "supportsNormalization": true, "connectionSpecification": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Destination Duckdb", "type": "object", "required": ["destination_path"], "additionalProperties": false, "properties": { "destination_path": { "type": "string", "description": "Path to the destination.duckdb file.", "example": "/local/destination.duckdb" }, "schema": { "type": "string", "description": "database schema, default for duckdb is main", "example": "main" } } } } This file defines what configuration options are available and required for your destination connector [DuckDB Example](https://airbyte.com/tutorials/creating-duckdb-destination-with-python). ### 2. Implement Required Functions You need to implement the following core functions in your connector code: - spec: Returns the connector specification. - check: Validates the configuration provided by the user. - write: Handles writing data to the destination. For Java destinations, you can follow the checklist: - Create the destination (use an existing connector as a template, e.g., destination-s3). - Build the connector. - Implement spec, check, and write. - Set up acceptance and unit/integration tests. - Update documentation [Java Destination Checklist](https://docs.airbyte.com/platform/next/connector-development/tutorials/building-a-java-destination). ### 3. Error Handling Destination connectors must log all errors using an approved protocol. For bulk destinations, errors should be recorded in the _airbyte_meta.changes key. For publish destinations, the connector must fail if it cannot write data and cannot log the error appropriately [Error Handling](https://docs.airbyte.com/platform/next/connector-development/partner-certified-destinations#error-handling). ### 4. Testing and Documentation - Set up acceptance tests to ensure your connector works as expected. - Write unit or integration tests. - Update the documentation for your connector. ### 5. (Optional) Contribute to Airbyte If you want your connector to be available to all Airbyte users, you can contribute it to the Airbyte codebase following their contribution guidelines [Custom Connectors](https://docs.airbyte.com/integrations/custom-connectors). --- Summary: To define a destination connector, create a spec.json for configuration, implement the required functions (spec, check, write), handle errors as per Airbyte guidelines, and ensure proper testing and documentation. Use existing connectors as templates to speed up development.