querying hive database using python

heenameena1234 at gmail.com heenameena1234 at gmail.com
Thu Sep 24 15:49:23 CEST 2015

I have server A and Server B. Server B is a hadoop cluster which has hive database and etc..
Server A has python 2.7. I would like to write a hive query using python on Server A to pull data from Server B. Server A and B has connectivity and no issues with network etc..

I have installed all necessary python packages on Server A. I wrote a python code using hive_utils package but it seems this code doesn't throw error or pull data, just hangs there. Can you please take a look at it and let me know what is the issue with code or suggest if you have better way or package could be used to pull data with example code. Thank you for your help.

here is the code I wrote.
#!/usr/bin/env python
import hive_utils

query = """
    SELECT *
    FROM test
hive_client = hive_utils.HiveClient(
a = hive_client.execute(query)
a = list(a)

More information about the Python-list mailing list