Hue notebook with SPARK SQL

146 views
Skip to first unread message

Xiaojing Gong

unread,
Jan 28, 2016, 2:26:17 PM1/28/16
to Hue-Users
If i setup HADOOP_CONF_DIR=/etc/hive/conf , from my command line pyspark, it has hiveContext,

It is the same behavior for notebook? If I am choose pyspark, it will have SparkContext as well as HiveContext? 

Thanks
Serena


Xiaojing Gong

unread,
Jan 28, 2016, 4:44:19 PM1/28/16
to Hue-Users
I may want to answer by myself. I just tested that. It seems working...

from pyspark.sql import HiveContext
from pyspark import SparkConf, SparkContext

sqlContext = HiveContext(sc)

sqlContext.sql(
"""
show tables
""")

DataFrame[tableName: string, isTemporary: boolean]
Reply all
Reply to author
Forward
0 new messages