You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by satyajit vegesna <sa...@gmail.com> on 2016/03/19 01:30:38 UTC

Fwd: DF creation

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.