spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "萝卜丝炒饭" <>
Subject RDD can not convert to df, thanks
Date Fri, 17 Mar 2017 03:48:20 GMT
hi all,

when i try to convert rdd to DF, I meet errors like belowing:

value toDF is not a member of org.apache.spark.rdd.RDD[XXXXX]
possible causer:may be a semicolon is missing before value toDF

My code looks like:

spark.textfile(xxxx).map(s=>_.split(".")).map(  s=>AAA(1,2)).toDF

the code can pass the compile but when run, it meet errors.

AAA is my defined case class.
my spark is 2.11.

Would any one can help me please?

thanks advanced.

View raw message