Hive错误:编译语句时出错:FAILED:ParseException 3:47缺失:在'<eof>'附近的'array'处

时间:2018-04-23 13:06:01

标签: hadoop hive hiveql

我想在结构中创建结构数组。

CREATE EXTERNAL TABLE TEST_EXTTBL_PAGE_VISIT_MASTER
(
    PERSONALIZATION_DATA STRUCT<EXPOSED_RULES array<struct<RULE_ID:varchar(70),RULESETID:varchar(70)>>>
)
COMMENT 'Page Visit details'
row format delimited fields terminated by ','
collection items terminated by '|'
map keys terminated by ':'
lines terminated by '\n'
LOCATION 's3a://XXX';

请提出我在这里遗失的内容。

1 个答案:

答案 0 :(得分:0)

您的数组名称

后缺少":"
CREATE EXTERNAL TABLE TEST_EXTTBL_PAGE_VISIT_MASTER
(
    PERSONALIZATION_DATA STRUCT<EXPOSED_RULES: array<struct<RULE_ID:varchar(70),RULESETID:varchar(70)>>>
)
COMMENT 'Page Visit details'
row format delimited fields terminated by ','
collection items terminated by '|'
map keys terminated by ':'
lines terminated by '\n'
LOCATION 's3a://XXX';