Hi all, I’m trying to write a custom destination. ...
# ask-community-for-troubleshooting
t
Hi all, I’m trying to write a custom destination. Is there anyway to get the current job id in the write function? Ideally I think airbyte should include the running context info(connection id, job id) in write method.
Copy code
class CustomDestination(Destination):
    def write(
        self, config: Mapping[str, Any], configured_catalog: ConfiguredAirbyteCatalog, input_messages: Iterable[AirbyteMessage]
    ) -> Iterable[AirbyteMessage]:
        # How to get the current job id of current connection sync
👀 1
1
o
loading...
loading...
a
Hi @Tan Ho, unfortunately, these metadata are not delivered in the input messages nor the configured catalog. Could you please share why you need these?
t
Hi @[DEPRECATED] Augustin Lafanechere, thanks for the response. We mainly use airbyte api for our integration along with a custom aribyte destination. Currently our service also stores custom object models for mapping one-one between airbyte’s connection/job/source objects, because Airbyte is lacking of custom metadata for those objects. The custom airbyte destination will forward
input_messages
to our service via api. Because we trigger the sync api manually via api, we want to keep track those
input_messages
belong which job(sync) object in our service. But we can not figuring out how to map those input_message belong to which job in our service. or which connection.
a
I'm affraid I've no solution to offer at the moment. Could you please a GitHub issue on our repo to request this feature?