使用pyhive,是否可以执行多个hql,例如'CREATE TABLE TABLE1 (ITEM_KEY BIGINT);CREATE TABLE TABLE2 (ITEM_NAME BIGINT);'。示例代码from pyhive import hiveconn = hive.Connection(host=host , port=port, username=user , password=passwd , auth=auth)cursor = conn.cursor()query= 'CREATE TABLE TABLE1 (ITEM_KEY BIGINT );CREATE TABLE TABLE2 (ITEM_NAME BIGINT );'. cursor.execute(query)
添加回答
举报
0/150
提交
取消