Import sqlContext.implicits._ before using df ()
Sent from Samsung Mobile. <div>-------- Original message --------</div><div>From: satyajit vegesna <satyajit.apas...@gmail.com> </div><div>Date:19/03/2016 06:00 (GMT+05:30) </div><div>To: u...@spark.apache.org, dev@spark.apache.org </div><div>Cc: </div><div>Subject: Fwd: DF creation </div><div> </div> Hi , I am trying to create separate val reference to object DATA (as shown below), case class data(name:String,age:String) Creation of this object is done separately and the reference to the object is stored into val data. i use val samplerdd = sc.parallelize(Seq(data)) , to create RDD. org.apache.spark.rdd.RDD[data] = ParallelCollectionRDD[10] at parallelize at <console>:24 is there a way to create dataframe out of this, without using createDataFrame, and by using toDF() which i was unable to convert.(would like to avoid providing the structtype). Regards, Satyajit.