Home > other >  Structured Streaming in the window there is no problem.
Structured Streaming in the window there is no problem.

Time:10-08

Today run Demo Spark website (http://spark.apache.org/docs/latest/structured-streaming-programming-guide.html#handling-late-data-and-watermarking

The code is as follows:
 import spark. Implicits. _ 

Val words=...//streaming DataFrame of schema {timestamp: timestamp, word: String}

//Group the data by the window and word and compute the count of each Group
Val windowedCounts=words
WithWatermark (" timestamp ", "ten minutes")
GroupBy (
Window ($" timestamp ", "ten minutes", "five minutes"),
$" word ")
The count ()

Then prompt window does not exist, is the need to introduce any package? Look at the official didn't say, who can help me, such as online ~

CodePudding user response:

https://mvnrepository.com/artifact/org.apache.spark/spark-streaming
Choose your version
  • Related