Re: createDataFrame question

2016-02-09 Thread jdkorigan
The correct way, is just to remove "sqlContext.createDataFrame", and everything works correctly def ConvertVal(iter): # some code return Row("val1", "val2", "val3", "val4") rdd = sc.textFile("").mapPartitions(ConvertVal).toDF() -- View this message in context: http://apache-spark-u

Re: createDataFrame question

2016-02-09 Thread jdkorigan
When using this function: rdd = sc.textFile("").mapPartitions(ConvertVal).toDF() I get an exception and the last line is: TypeError: 'JavaPackage' object is not callable Since my function return value is already DataFrame, maybe there is a way to access this type from my rdd? -- View this mess

Re: createDataFrame question

2016-02-09 Thread satish chandra j
HI, Hope you are aware of "toDF()" which is used to convert your RDD to DataFrame Regards, Satish Chandra On Tue, Feb 9, 2016 at 5:52 PM, jdkorigan wrote: > Hi, > > I would like to transform my rdd to a sql.dataframe.Dataframe, is there a > possible conversion to do the job? or what would be th