I want to apply a function via flatMap
to each group produced by DataSet.groupBy
. Trying to call flatMap
I get the compiler error:
error: value flatMap is not a member of org.apache.flink.api.scala.GroupedDataSet
My code:
var mapped = env.fromCollection(Array[(Int, Int)]())
var groups = mapped.groupBy("myGroupField")
groups.flatMap( myFunction: (Int, Array[Int]) => Array[(Int, Array[(Int, Int)])] ) // error: GroupedDataSet has no member flatMap
Indeed, in the documentation of flink-scala 0.9-SNAPSHOT no map
or similar is listed. Is there a similar method to work with? How to achieve the desired distributed mapping over each group individually on a node?