Hi,
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='abc.sac.com',
port=10000,
authMechanism="PLAIN",
user='amit',
password='amit',
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
Thanks
Amit
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!