reduceByKey is not a member

apache-spark
#1

Can someone help me on the below error

scala> val ps1 = ps.map(x=>(x,1)).reduceByKey(+).map(item
| =>item.swap).sortByKey(false).foreach(println)
:31: error: value reduceByKey is not a member of org.apache.spark.sql.Dataset[(String, Int)]
val ps1 = ps.map(x=>(x,1)).reduceByKey(+).map(item

0 Likes

#2

Hi,
kindly send the entire details like what is ps
Also send the screen shots of complete code

0 Likes

#3

I got the issue, it was my typo, Please close the issue.
Thanks

0 Likes

closed #4
0 Likes