我正在使用pyhive与hive交互。在
使用下面的代码,SELECT语句运行良好。在# Import hive module and connect
from pyhive import hive
conn = hive.Connection(host="HOST")
cur = conn.cursor()
# Import pandas
import pandas as pd
# Store select query in dataframe
all_tables = pd.read_sql("SELECT * FROM table LIMIT 5", conn)
print all_tables
# Using curssor
cur = conn.cursor()
cur.execute('SELECT * FROM table LIMIT 5')
print cursor.fetchall()
在这里之前没有问题。当我想INSERT进入蜂箱时。在
假设我要执行这个查询:INSERT INTO table2 SELECT Col1, Col2 FROM table1;
我试过了:
^{pr2}$
我收到了这个错误pyhive.exc.OperationalError: TExecuteStatementResp(status=TStatus(errorCode=1, errorMessage=u'Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask', sqlState=u'08S01', in