Hi I am new to scala and spark. I am trying group by through spark sql. When I am trying to save or to view the output.It throws following error.
value coalesce is not a member of org.apache.spark.sql.RelationalGroupedDataset
This is my code.
val fp = filtertable.select($"_1", $"_2", $"_3",$"_4").groupBy("_1", "_2","_3")
fp.show() // throws error
fp.coalesce(1).write.format("csv").save("file://" + test.toString()) //throws error.
Any help will be appreciated.