hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit Bajpai <>
Subject Yarn Application ID for Hive query
Date Fri, 15 Jul 2016 05:22:18 GMT

I am using the below python program to run a hive query. How can I get the Yarn application
ID using the python program for the hive query execution.

import pyhs2

with pyhs2.connect(host='',
               database='default') as conn:
    with conn.cursor() as cur:
        #Execute query
        cur.execute("SELECT COMP_ID, COUNT(1) FROM tableA GROUP BY COMP_ID")

        #Fetch table results
        for i in cur.fetch():
            print i


Legal Disclaimer:
The information contained in this message may be privileged and confidential. It is intended
to be read only by the individual or entity to whom it is addressed or by their designee.
If the reader of this message is not the intended recipient, you are on notice that any distribution
of this message, in any form, is strictly prohibited. If you have received this message in
error, please immediately notify the sender and delete or destroy any copy of this message!
View raw message