I would like to push my spark structured streaming processed data to the REST API. can someone share the examples of same. i have found few but all are related to spark streaming, not the structured streaming.
1 Answer
I have not heard about a REST API sink for Spark Structured Streaming, but you could write one yourself. Start from org.apache.spark.sql.execution.streaming.Source.
The easiest would however be to use DataStreamWriter.foreach or foreachBatch (since 2.4).
1 Comment
Mehdi LAMRANI
This is a big hole in the API. Rest should be made available as Source and Sink, as it is as Ubiquitous as Json. I was a bit shocked there was none embedded already. Planning to write one for the community if I manage to find some time to do it.