Hive 插入数据失败Unable to create temp file for insert

一、报错信息

hive> 
    > INSERT INTO test.test_cat_aa_approval_flow_node_di(operator,note,status,approval_id,approval_order_num) VALUES('cat',from_unixtime(unix_timestamp(),'yyyy-MM-dd HH:mm:ss'),1,1111,222);
FAILED: SemanticException [Error 10293]: Unable to create temp file for insert values Expression of type TOK_FUNCTION not supported in insert/values

二、报错原因

hive 不支持MySQL的insert values格式,需要使用临时表格式

三、修改SQL的values部分为select

INSERT INTO test.test_cat_aa_approval_flow_node_di(operator,note,status,approval_id,approval_order_num) select 'lvgang01',from_unixtime(unix_timestamp(),'yyyy-MM-dd HH:mm:ss'),1,1111,222;

你可能感兴趣的:(hive,hadoop,数据仓库)