When I've implemented the function I wanted it to return an RDD. And probably collect it to List later. But why does it return Unit instead? What should I change in the implementation to make it return an RDD?
Sales is a map (saleId, Saletype) - val sales: Map[Int, String]
val processSales: Unit = sales.foreach(sale => sc.makeRDD(salesService.getData(sale._1)))