https://linen.dev logo
#ask-community-for-troubleshooting
Title
# ask-community-for-troubleshooting
t

Tan Ho

03/21/2022, 12:22 PM
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

Octavia Squidington III

03/21/2022, 1:34 PM
loading...
loading...
a

Augustin Lafanechere (Airbyte)

03/21/2022, 2:28 PM
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

Tan Ho

03/21/2022, 2:50 PM
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

Augustin Lafanechere (Airbyte)

03/22/2022, 6:10 PM
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?