Great, I got that to work following your example! Thanks.
A followup question is: If I had a custom SQL type (UserDefinedType),
how can I map it to this type from the RDD in the DataFrame?
Regards
On Mon, Jan 18, 2016 at 1:35 PM, Ted Yu wrote:
> By SparkSQLContext, I assume you mean SQLContext
By SparkSQLContext, I assume you mean SQLContext.
>From the doc for SQLContext#createDataFrame():
* dataFrame.registerTempTable("people")
* sqlContext.sql("select name from people").collect.foreach(println)
If you want to persist table externally, you need Hive, etc
Regards
On Mon, Jan
This requires Hive to be installed and uses HiveContext, right?
What is the SparkSQLContext useful for?
On Mon, Jan 18, 2016 at 1:27 PM, Ted Yu wrote:
> Please take a look
> at sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameSuite.scala
>
> On Mon, Jan 18, 2016 at 9:57 AM, raghuk
Btw, Thanks a lot for all your quick responses - it is very useful and
definitely appreciate it :-)
On Mon, Jan 18, 2016 at 1:28 PM, Raghu Ganti wrote:
> This requires Hive to be installed and uses HiveContext, right?
>
> What is the SparkSQLContext useful for?
>
> On Mon, Jan 18, 2016 at 1:27 P
Please take a look
at sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameSuite.scala
On Mon, Jan 18, 2016 at 9:57 AM, raghukiran wrote:
> Is creating a table using the SparkSQLContext currently supported?
>
> Regards,
> Raghu
>
>
>
> --
> View this message in context:
> http://apache
Have you taken a look
at sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala ?
You can find examples there.
On Mon, Jan 18, 2016 at 9:57 AM, raghukiran wrote:
> Is creating a table using the SparkSQLContext currently supported?
>
> Regards,
> Raghu
>
>
>
> --
> View this message i