I am trying to make connection to a remote Hive cluster using python. I tried pyhive, pyhs2 but had no success. With the below code, I am able to connect to hive but how can I print and save the result in a panda data frame?
I have tried the below lines without any luck: out = stdout.read() print stdout.read()
import os
import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.load_host_keys(os.path.expanduser(os.path.join("~", ".ssh", "known_hosts")))
ssh.connect('00.00.00.00.', username='******', password='*******')
sshin, sshout, ssherr= ssh.exec_command('hive -e "select * from t1"')
I want to print and save the result in a pandas data frame.