在hive表中的struct数组中INSERT值

时间:2015-12-12 10:42:04

标签: arrays struct hive

我尝试了这个查询:

INSERT INTO TABLE table_name
PARTITION(col1,col2)
values(
struct_nstd((q),(a),(z),(w),(s),(x),(c),(d),(e),(r),(f),(v),(b),(g),(t),(y),(h),(n),(m),(j),(u));
)
;

struct = string

中所有值的数据类型

我收到的错误是:

Semantic Exception [Error 10293]: Unable to create temp file for insert values Expression of type TOK_FUNCTION not supported in insert/values

我已经尝试使用大括号组合将值插入到struct

的数组中

1 个答案:

答案 0 :(得分:0)

请先创建一个至少有一行的虚拟表,然后插入例如 -

INSERT INTO TABLE table_name
PARTITION(col1,col2)
values(
struct_nstd((q),(a),(z),(w),(s),(x),(c),(d),(e),(r),(f),(v),(b),(g),(t),(y),(h),(n),(m),(j),(u));
) from dummytable limit 1;