Multiple aggregations in Spark Structured Streaming

前端 未结 8 1765
难免孤独
难免孤独 2020-12-09 04:09

I would like to do multiple aggregations in Spark Structured Streaming.

Something like this:

  • Read a stream of input files (from a folder)
  • Per
8条回答
  •  庸人自扰
    2020-12-09 04:37

    As of spark structured streaming 2.4.5, multiple aggregations are not supported in stateless processing. But it is possible to aggregate multiple times if you need stateful processing.

    With append mode, you can use flatMapGroupWithState API on a grouped dataset (obtained by using groupByKey API) multiple times.

提交回复
热议问题