I am trying to connect to hive server using below code but getting error when trying to run from my LOCAL Machine: 'beeline' is not recognized as an internal or external command. Same code is working fine from Hive Server. '''
Import subprocess
Hive_Connection_URL = "jdbc:hive2://102-100-1070.stm.xyz.com:10000/default;;ssl=true;sslTrustStore=/app/bds/cloudera_truststore.jks;sslTrustPassword=;principal=hive/_HOST@BDS.xyz.COM"
target_hive_db = "test_db"
target_table_name = "test_table"
cmd = "select count(1) from " + target_hive_db + "." + target_table_name
hive_query = "beeline -u '" + Hive_Connection_URL + "' --fastConnect=true --showHeader=false --verbose=false --showWarnings=false --silent=true --outputformat=csv2 -e " + '"'+ cmd +'"'
val = subprocess.check_output(hive_query,shell=True)
'''
This code is giving error when trying to run from my local machine:
'beeline' is not recognized as an internal or external command, operable program or batch file.