what is the appropriate return value for the write...
# replication-ask-ai
a
what is the appropriate return value for the write method in a destination connector
k
The
write
operation in a destination connector is responsible for reading input data from the source and writing it to the underlying destination. It takes as input the config file used to run the connector and the configured catalog, which describes the schema of the incoming data and how it should be written to the destination. The
write
operation returns two things: 1. Data written to the underlying destination. 2. `AirbyteMessage`s of type
AirbyteStateMessage
, written to stdout to indicate which records have been written so far during a sync. It's important to output these messages when possible in order to avoid re-extracting messages from the source. For Java destination connectors, you implement the
write
operation by implementing the
getConsumer
method in your generated
<Name>Destination.java
file. For Python destination connectors, you implement the
write
operation by implementing the
write
method in your generated
destination.py
file. For more information, you can refer to the [Java destination tutorial](https://docs.airbyte.com/connector-development/tutorials/building-a-java-destination) and the [Python destination tutorial](https://docs.airbyte.com/connector-development/tutorials/building-a-python-destination).