Questions tagged [pyhive]
107 questions
12
votes
2 answers
pyhive connection error: thrift.transport.TTransport.TTransportException: TSocket read 0 bytes
I'm trying to get a table located in hive (hortonworks) ,to collect some twitter data to implement on a machine learning project, using pyhive since pyhs2 is not supported by python3.6.
Here's my code:
from pyhive import hive
conn =…

hsfelix
- 153
- 1
- 8
6
votes
2 answers
How to install SASL with Python 3.8?
I am trying to install sasl3-0.2.11 python package on a windows 10 machine (64 bit).
It is failing with a C1083 fatal error.
Due to some proxies and me not being able to avoid them, I am installing it by downloading the tar.gz from pypi, logging…

nourou
- 81
- 1
- 3
6
votes
1 answer
How to specify max vcores to be allocated to a query in hive?
I am running multiple queries on the hive. I have a Hadoop cluster with 6 nodes. Total vcores in the cluster is 21.
I need only 2 cores to be allocated to a python process so that the rest of the available cores will be used by another main process.…

Vishnu
- 11,614
- 6
- 51
- 90
6
votes
1 answer
Execute multiple queries in single pyhive.execute command
Using pyhive, is it possible to execute multiple hql's like 'CREATE TABLE TABLE1 (ITEM_KEY BIGINT );CREATE TABLE TABLE2 (ITEM_NAME BIGINT );'.
Sample code
from pyhive import hive
conn = hive.Connection(host=host
, port=port,…

sjd
- 1,329
- 4
- 28
- 48
6
votes
0 answers
PyHive Thrift transport exception: read 0 bytes
I'm trying to connect to Hive server-2 running inside docker container (from outside the container) via python (PyHive 0.5, python 2.7) using DB-API (asynchronous) example
from pyhive import hive
conn = hive.connect(host='172.17.0.2', port='10001',…

y2k-shubham
- 10,183
- 11
- 55
- 131
5
votes
1 answer
Creating Table w PyHive & SqlAlchemy
I'm trying to create a table in a Hive Database using SqlAlchemy ORM. My setting is Python 3.6 with PyHive==0.6.1 and SQLAlchemy==1.2.11 (with their relative dependencies) and Hive 1.1.0-cdh5.15.1.
My approach is the following:
from sqlalchemy…

Pierluigi
- 1,048
- 2
- 9
- 16
4
votes
0 answers
PyHive Connection Error - Could not start SASL
I'm trying to connect to Hive server with PyHive.
So far, I have this:
from pyhive import hive
import pandas as pd
# Create Hive connection
conn = hive.Connection(host="*********", port=10000, auth='NONE')
df = pd.read_sql("select…

A.L.
- 163
- 3
- 10
4
votes
1 answer
pyhive: Set hive properties using pyhive
i have a complex hive query which underlying joins are cartesian product. so i need to set the below properties. but when i execute these properties using pyhive it is not able to execute. i am getting an error asking to set properties for …

LUZO
- 1,019
- 4
- 19
- 42
4
votes
1 answer
Creating scratch table with partition by date range
I am trying to create a scratch table using the below query, I am trying to modify it to create table with partition by dates
create table scratch.myTable
as (
select
concat(eid,'_',group) as eid_group,
…

Santhosh
- 891
- 3
- 12
- 31
4
votes
5 answers
How to access remote hive using pyhive
Used this link to try to connect to a remote hive. Below is the code used. The error msg received is also given below
How to Access Hive via Python?
Code
from pyhive import hive
conn = hive.Connection(host="10.111.22.11", port=10000,…

kten
- 445
- 4
- 13
- 26
3
votes
1 answer
PyHive[Hive] on REHL7 ImportError: libsasl2.so.2: cannot open shared object file: No such file or directory
I can't seem to get PyHive to work correctly. Yum reports
Package cyrus-sasl-lib-2.1.26-20.el7_2.x86_64 already installed and latest version.
Hope I am just missing something. Please…

Julius Remigio
- 31
- 1
- 3
3
votes
5 answers
No module named 'pyhive'
I'm trying to access data from Hive in a iPython Notebook.
So I run
pip3 install PyHive
This returns
Requirement already satisfied: PyHive in /usr/local/lib/python3.5/site-packages
But then when I run the following import
from pyhive import…

Stacker
- 587
- 4
- 7
- 11
2
votes
0 answers
PyHive connecting to Hive on Dataproc got VPC_SERVICE_CONTROLS PERMISSION_DENIED NO_MATCHING_ACCESS_LEVEL error
I'm using pyhive to connect to Hive on GCP Dataproc. Queries succeed and fail intermittently. This is one of the issues. It happened during a
DROP TABLE IF EXISTS db_name.tb_name
Client side got
Traceback (most recent call last):
File…

zpz
- 354
- 1
- 3
- 16
2
votes
0 answers
NullPointerException in Spark Thrift Server using Apache Superset or Redash
I get a NullPointerException after connecting BI tools like Redash or Superset to a Spark Thriftserver (both tools use PyHive). Apache Zeppelin works fine for queries using STS and I could never reproduce the error there (Zeppelin uses…

Daniel Müller
- 426
- 1
- 5
- 19
2
votes
0 answers
Access pyhive through hive-site.xml properties
I am trying to access Hive thru Pyhive. I don't want to hardcode HiveServer2 host details in the application code. Is there any way for Pyhive to pick up the details from hive-site.xml?
Or In general, Is there any better client than Pyhive which can…

Saisumanth Gopisetty
- 856
- 9
- 14