2019-06-14
阅读量:
1041
hive 创建表代码报错
使用hive创建表
create table youtube1(videoId string,
uploader string,
age int,
category array,
length int,
views int,
rate float,
ratings int,
comments int,
relatedId array)
row format delimited
fields terminated by “\t”
collection items terminated by “&”
stored AS textfile;
出现如下错误:
Error while compiling statement: FAILED: ParseException line 1:77 mismatched input ',' expecting < near 'array' in list type
什么原因呢?
答:arrary 元素的类型需要指定的,比如是字符串数据那么要指定类型为字符串。指定方法array<string>
此外 语句中的“ ”目测是中文的符号,也需要注意一下,只能使用英文的引号。






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论