Reg Spark streaming API

Hi,

How to write an API in structured streaming where state persists. We are trying to use mapGroupwithState API with little success.

Shobhit