At last,I figure it out finally. But I think is not a great idea to use this component to connect hive, it's depend lots of jar package, and you must install jar package with python-java debug REPL(mostly you are guessing),it is bad.
refer : https://github.com/ghostyusheng/python-hive-jdbc
# -*- coding: utf8 -*-
import jaydebeapi
import os
class Jdbc:
base_sql = [
"set hive.mapred.mode=nonstrict",
"set hive.strict.checks.cartesian.product=false",
"set hive.execution.engine=tez"
]
def query(self, sql, db = 'tap_ods'):
url = 'jdbc:hive2://xx.xx:10000/' + db
dirver = 'org.apache.hive.jdbc.HiveDriver'
DIR = os.getcwd() + '/lib/'
jarFile = [
DIR + 'hive-jdbc-3.1.1.jar',
DIR +