BigD
BigD

Reputation: 888

How to write spark structured streaming data to REST API?

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.

Upvotes: 1

Views: 1457

Answers (1)

Jacek Laskowski
Jacek Laskowski

Reputation: 74619

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

Upvotes: 1

Related Questions