Skip to main content
correction of hyperlink
Source Link
Michael Heil
  • 18.8k
  • 6
  • 55
  • 90

enter link description hereWhen When you use watermarking in Spark you need to ensure that your aggregation knows about the window. The Spark documentationSpark documentation provides some more background.

In your case the code should look something like this

blackList = blackList.withWatermark("timestamp", "2 seconds") .groupBy(window(col("timestamp"), "10 minutes", "5 minutes"), col("bl_iban")) .agg(col("bl_iban"), max("timestamp")); 

It is important, that the attribute timestamp has the data type timestamp!

enter link description hereWhen you use watermarking in Spark you need to ensure that your aggregation knows about the window. The Spark documentation provides some more background.

In your case the code should look something like this

blackList = blackList.withWatermark("timestamp", "2 seconds") .groupBy(window(col("timestamp"), "10 minutes", "5 minutes"), col("bl_iban")) .agg(col("bl_iban"), max("timestamp")); 

It is important, that the attribute timestamp has the data type timestamp!

When you use watermarking in Spark you need to ensure that your aggregation knows about the window. The Spark documentation provides some more background.

In your case the code should look something like this

blackList = blackList.withWatermark("timestamp", "2 seconds") .groupBy(window(col("timestamp"), "10 minutes", "5 minutes"), col("bl_iban")) .agg(col("bl_iban"), max("timestamp")); 

It is important, that the attribute timestamp has the data type timestamp!

Source Link
Michael Heil
  • 18.8k
  • 6
  • 55
  • 90

enter link description hereWhen you use watermarking in Spark you need to ensure that your aggregation knows about the window. The Spark documentation provides some more background.

In your case the code should look something like this

blackList = blackList.withWatermark("timestamp", "2 seconds") .groupBy(window(col("timestamp"), "10 minutes", "5 minutes"), col("bl_iban")) .agg(col("bl_iban"), max("timestamp")); 

It is important, that the attribute timestamp has the data type timestamp!