我想在结构中创建结构数组。
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';
请提出我在这里遗失的内容。
答案 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';