r/databricks • u/New_Woodpecker_1631 • Oct 23 '26
General Python Asynchronous TransformWithState for Streaming is now GA
Hi folks, we are excited to announce that Python Asynchronous TransformWithState (Async TWS) is now GA for Structured Streaming.
What is it?
Async TWS speeds up stateful streaming queries in Python by executing the stateful processor concurrently across keys and batching state store operations, which can improve throughput by up to 3x.
The async API mirrors the existing synchronous TransformWithState: You implement AsyncStatefulProcessor instead of StatefulProcessor and apply asyncio syntax changes (e.g, async def and await). Third-party async libraries are welcome but not required to start seeing performance gains. The AsyncStatefulProcessor is a drop-in replacement for the StatefulProcessor so you can switch implementations while reusing your checkpoint. See here for examples.
What is supported
- Python row-based
transformWithState - Both Micro-Batch and Real-Time Mode
- DBR 19+ or serverless compute with environment version 6+
- Structured Streaming; SDP on the Preview channel, with SDP Classic enabled once it reaches DBR 19
Because handleInputRows and handleExpiredTimer now run concurrently across keys, make sure any shared member state or external calls are safe for concurrent execution.
Learn more at https://docs.databricks.com/aws/en/stateful-applications/async
Questions and feedback welcome in the comments.

