sqlContext not avilable as hiveContext in notebook

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

sqlContext not avilable as hiveContext in notebook

Meethu Mathew
Hi,

I am running zeppelin 0.7.0. the sqlContext already created in the zeppelin notebook returns a <pyspark.sql.context.SQLContext object at 0x7f707a9e9050>, even though my spark is built with HIVE. 

"zeppelin.spark.useHiveContext" in the spark properties is set to true.


                  hc = HiveContext.getOrCreate(sc)

​but still its returning 
<pyspark.sql.context.SQLContext object at 0x7f707a9e9050>
​.

My pyspark shell and ​jupyter notebook is returning 
<pyspark.sql.context.HiveContext at 0x7fa3421b1c90>
​ without doing anything.

How to get
<pyspark.sql.context.HiveContext at 0x7fa3421b1c90>
​ in the zeppelin notebook ?​

Regards, 
Meethu Mathew

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlContext not avilable as hiveContext in notebook

Jianfeng (Jeff) Zhang
I could get hiveContext correctly in zeppelin master, could you try 0.7.1 which is released recently ?



Best Regard,
Jeff Zhang


From: Meethu Mathew <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, April 4, 2017 at 8:45 PM
To: "[hidden email]" <[hidden email]>
Subject: sqlContext not avilable as hiveContext in notebook

Hi,

I am running zeppelin 0.7.0. the sqlContext already created in the zeppelin notebook returns a <pyspark.sql.context.SQLContext object at 0x7f707a9e9050>, even though my spark is built with HIVE. 

"zeppelin.spark.useHiveContext" in the spark properties is set to true.


                  hc = HiveContext.getOrCreate(sc)

​but still its returning 
<pyspark.sql.context.SQLContext object at 0x7f707a9e9050>
​.

My pyspark shell and ​jupyter notebook is returning 
<pyspark.sql.context.HiveContext at 0x7fa3421b1c90>
​ without doing anything.

How to get
<pyspark.sql.context.HiveContext at 0x7fa3421b1c90>
​ in the zeppelin notebook ?​

Regards, 
Meethu Mathew

Loading...