You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Bitfox <bi...@bitfox.top> on 2022/02/07 08:34:17 UTC

foreachRDD question

Hello list,

for the code in the link:
https://github.com/apache/spark/blob/v3.2.1/examples/src/main/scala/org/apache/spark/examples/streaming/SqlNetworkWordCount.scala

I am not sure, why enclose the RDD to Dataframe logic in a foreachRDD block?
What's the use of foreachRDD?


Thanks in advance.