I am not able to connect hive through python/spark in jupyter notebook. I am using version 2.7 of python. Can someone please help?
First approach:
import commands
cmd='beeline -u "jdbc:hive2://...../principal =hive/url;ssl=true" -e '"select * from table name"
Status,output = commands.getstatusoutput(cmd)
If status ==0:
Print output your text
Else:
Print "error"
I am getting an error for the output. It should return the table structure of hive.
Second approach:
From pyhive import hive
Not able to import pyhive
. I am using python version as 2.7.13