Questions tagged [pyhive]
107 questions
1
vote
1 answer
Where to find hive url, username and password?
In the command line, I can enter hive to get hive shell like:
hive>
then execute some queries.
Now I need write a python script with PyHive to execute some tasks, like:
conn = hive.Connection(host="10.111.22.11", port=10000,…

xingbin
- 27,410
- 9
- 53
- 103
1
vote
1 answer
PyHive with Kerberos throws Authentication error after few calls
I am trying to connect to Hive using Python (PyHive Lib) to read some data and then I further connects it to hive Flask to show in Dashboard.
It all works fine for few calls to hive, however soon after that I am getting following error.
Traceback…

Gaurang Shah
- 11,764
- 9
- 74
- 137
1
vote
0 answers
org.apache.hive.service.cli.HiveSQLException?
I have Configured HDP 2.6 in my server ,everything is working fine. Even I am able to connect to superset to hive.
when I am trying to visualise the data finding respective error:
(pyhive.exc.OperationalError)…

andani
- 414
- 1
- 9
- 28
1
vote
1 answer
Query hive from flask
I am new to flask and i am using the following flask cookiecutter to start with a quick prototype. The main idea of project is to collect data from hive cluster and push it to the end user using flask.
Although, i was successfully able to connect…

ziedTn
- 262
- 5
- 17
1
vote
2 answers
Connection to Hive using python and Kerberos
I'm trying to connect to hive using Python. I installed all of the dependencies required (sasl, thrift_sasl, etc..)
Here is how I try to connect:
configuration = {"hive.server2.authentication.kerberos.principal" : "hive/_HOST@REALM_HOST",…

cfrapper
- 55
- 1
- 9
1
vote
3 answers
Insert Into Hive Using Pyhive invoke an error
I am using pyhive to interact with hive.
The SELECT statement going well using this code bellow.
# Import hive module and connect
from pyhive import hive
conn = hive.Connection(host="HOST")
cur = conn.cursor()
# Import pandas
import pandas as pd
#…

AnouarZ
- 1,087
- 8
- 23
1
vote
2 answers
How to execute query on hive with jinjasql
Is it possible to execute query for hive using jinjasql and pyhive?
When I tried it I got following error.
pyhive.exc.ProgrammingError: Unsupported param format:
odict_values(['XXXXXXX'])
I can execute query with jinjasql as well as with pyhive…

user9756398
- 13
- 5
1
vote
1 answer
ImportError: No module named builtins with PyHive using Python 2.7
I'm trying to get PyHive working on a Windows 10 (64-bit) machine with Python 2.7.14.
The machine is secured to the point of it not having Internet access, but I can push files to it.
I have pushed PyHive-0.5.1, future-0.9.0, and thrift-0.11.0…

David Rush
- 11
- 3
1
vote
1 answer
How to configure the hive.Connection() to pass Hive the settings I want?
I am running Spyder 3.2.8 on Ubuntu 17.10.
I would like to pass Hive that is on remote cluster to give names to column names using the set hive.cli.print.header=true; command.
Here is what I have done so far:
con = hive.Connection(host="name",
…

steves
- 331
- 3
- 16
1
vote
1 answer
Error: No module named 'ttypes'
I'm trying to connect python to hive on windows 7 (64 bit) with
python version 3.6
I have created environment in anaconda and installed these packages:
pure-sasl (0.4.0)
PyHive (0.5.1)
thrift (0.11.0)
thrift-sasl (0.3.0)
Code Connection :
from…

Ahmed Hassan
- 65
- 1
- 2
- 12
1
vote
0 answers
Can't connect to unsecured Hive using Pyhive/impyla. Could not start SASL error
I'm trying to acces to an unsecured hive (hive.server2.authentication is NONE) and I get the following error message in both pyhive and impala:
TTransportException: Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism…

h3h325
- 751
- 1
- 9
- 19
1
vote
1 answer
Presto/Python: How can I connect to Presto on AWS EMR using python?
I have created a presto cluster using AWS EMR. I am using all of the default configurations. I would like to write a python script on the master node to push queries to presto and get the result.
I found the PyHive library but I don't know what to…

Bob Swain
- 3,052
- 3
- 17
- 28
1
vote
2 answers
Hive Server 2 error on python connect with hiveserver2
I am using
Centos , Python2.7 , hive 2.1 ,Hadoop 2.7.2 ,pyHive
here is code
from pyhive import hive
from TCLIService.ttypes import TOperationState
cursor = hive.connect('localhost').cursor()
cursor.execute('SELECT * FROM my_awesome_data LIMIT 10',…

Imran
- 345
- 1
- 7
- 19
1
vote
1 answer
Error retrieving data from hive using python
I use python to connect hive & retrieve the data into pandas, but its giving an error:
pyhive.exc.OperationalError: TExecuteStatementResp
my code:
# -*- coding: utf-8 -*-
from pyhive import hive
from impala.util import as_pandas
from string import…

Joker
- 41
- 3
- 10
1
vote
0 answers
How to iterate over Pyhive fetchmany cursor
I am migrating my ETL code to Python and was using pyhs2, but am going to switch to pyhive since it is actively supported and maintained and no one has taken ownership of pyhs2.
My question is how to structure the fetchmany method to iterate over…

Joshua Magaña
- 3
- 1