You can create a hive context explicitly as follows:

 val hc = new org.apache.spark.sql.hive.HiveContext(sc)

But this will most likely not work for %sql as that will use the internal 
context which for you appears to be the non Hive version

If the config param you are using is not taking effect, try restarting the 
spark interpreter. 


Mohit
www.dataorchardllc.com

> On Aug 8, 2016, at 1:49 PM, Teik Hooi Beh <th...@thbeh.com> wrote:
> 
> Hi,
> 
> I have set zeppelin.sparkuseHiveContext to 'true' in spark interpreter but 
> yet when I try to use saveAsTable, I got the following -
> 
> java.lang.RuntimeException: Tables created with SQLContext must be TEMPORARY. 
> Use a HiveContext instead.
> 
> 
> In my notebook I am using sqlContext or is there another way to use 
> HiveContext?
> 
> Thanks
> 
> Regards
> Beh

Reply via email to