코드 초기에 아래 코드를 넣어준다.

 

      val sqlContext= new org.apache.spark.sql.SQLContext(sc)
      import sqlContext.implicits._

 

 

 

 

참고 : https://stackoverflow.com/questions/33704831/value-todf-is-not-a-member-of-org-apache-spark-rdd-rdd

 

value toDF is not a member of org.apache.spark.rdd.RDD

Exception : val people = sc.textFile("resources/people.txt").map(_.split(",")).map(p => Person(p(0), p(1).trim.toInt)).toDF() value toDF is not a member of org.apache.spark.rdd.RDD[Person] He...

stackoverflow.com

https://community.cloudera.com/t5/Advanced-Analytics-Apache-Spark/Spark-Scala-Error-value-toDF-is-not-a-member-of-org-apache/td-p/29878

 

Cloudera | The enterprise data cloud company

Cloudera delivers an Enterprise Data Cloud for any data, anywhere, from the Edge to AI.

www.cloudera.com

 

+ Recent posts