Can a tempTable registered by sqlContext be used inside a forEachRDD?

2016-01-03 Thread SRK
Hi, Can a tempTable registered in sqlContext be used to query inside forEachRDD as shown below? My requirement is that I have a set of data in the form of parquet inside hdfs and I need to register the data as a tempTable using sqlContext and query it inside forEachRDD as shown below.

Re: Can a tempTable registered by sqlContext be used inside a forEachRDD?

2016-01-03 Thread Sathish Kumaran Vairavelu
I think you can use foreachpartition instead of foreachrdd Sathish On Sun, Jan 3, 2016 at 5:51 AM SRK wrote: > Hi, > > Can a tempTable registered in sqlContext be used to query inside forEachRDD > as shown below? > My requirement is that I have a set of data in the