'How to group by key in apache spark
I have a case class like this
case class Employee(name: String, id: Int)
and I want a dataset that looks like a Map ---> key and list of values i.e
Dataset[String, List[Employee]]
My use case is I should group the IDs of employees with same name. Is there an operator in Spark to do that.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
