Enrico D'Urso
06/27/2023, 9:46 AMyield AirbyteMessage(
type=Type.STATE,
state=AirbyteStateMessage(data={stream.name: {"date": max_date}})
)
it works well, but as I have multiple streams, I need to emit a state per each of them.
For some reasons, it looks like just the latest gets saved.kapa.ai
06/27/2023, 9:46 AMkapa.ai
06/27/2023, 9:46 AMAirbyteStateMessage for each stream. However, you need to make sure that your custom connector's source class has the per_stream_state_enabled property set to True. Here's an example of how to do that: python class MyCustomSource(AbstractSource): @property def per_stream_state_enabled(self) -> bool: return True By setting this property to True, your custom connector should be able to save the state for each stream separately. For more information on incremental streams and state management, you can refer to the [Incremental Streams documentation](https://docs.airbyte.com/connector-development/cdk-python/incremental-stream).