Hi, I am trying to develop a custom connector (gen...
# help-connector-development
e
Hi, I am trying to develop a custom connector (generic Python). I can defo emit data, I am just stuck here, when trying to emit a state:
Copy code
for record in json_records:
    <http://logger.info|logger.info>(record)
    yield AirbyteMessage(
        type=Type.RECORD,
        record=AirbyteRecordMessage(stream=stream.name, data=record, emitted_at=int(datetime.now().timestamp()) * 1000),
    )
#yield AirbyteStateMessage(state={"data": {stream.name: {"date": max_date}}})
yield AirbyteMessage(
    type=Type.STATE,
    state=AirbyteStateMessage(state={"data": {stream.name: {"date": max_date}}})
)
that is inside the read() function, (Source class extension). I don't find an example to understand how to properly fill the last 3 lines! Any clue? thanks
k
A message from kapa.ai
New message text here
e
awesome