Spark Structured Streaming - Processing each row

前端 未结 2 498
无人共我
无人共我 2021-02-02 04:36

I am using structured streaming with Spark 2.1.1. I need to apply some business logic to incoming messages (from Kafka source).

essentially, I need to pick up the messa

2条回答
  •  感动是毒
    2021-02-02 05:30

    try ForeachWriter, In ForeachWriter process() method receives single row from data frame. and you can process the data as you want. https://spark.apache.org/docs/latest/api/java/org/apache/spark/sql/ForeachWriter.html

提交回复
热议问题