1

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 1

1

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).

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.