Hive 输入不匹配'&燃气轮机';期待<;近';结构';结构类型中的
失败:ParseException行1:161不匹配的输入'>',在结构类型中应<接近'STRUCT' 配置单元>创建外部表user1(id BIGINT,created_at STRING,source STRING,favorited BOOLEAN,retweet_count INT,retweet_status STRUCTHive 输入不匹配'&燃气轮机';期待<;近';结构';结构类型中的,hive,hiveql,create-table,Hive,Hiveql,Create Table,失败:ParseException行1:161不匹配的输入'>',在结构类型中应创建外部表user1(id BIGINT,created_at STRING,source STRING,favorited BOOLEAN,retweet_count INT,retweet_status STRUCTsreen_name:STRING,name:STRING>>,entities STRUCT,user_提及:ARRAY>,hashtags:ARRAY>>,text STRING,user STR
创建外部表user1
CREATE EXTERNAL TABLE user1
(
id BIGINT
,created_at STRING
,source STRING
,favorited BOOLEAN
,retweet_count INT
,retweeted_status STRUCT
<
text:STRING
,user:STRUCT
<
sreen_name :STRING
,name :STRING
>
>
,entities STRUCT
<
urls :ARRAY<STRING>
,user_mentions :ARRAY<STRING>
,hashtags :ARRAY<STRING>
>
,text STRING
,user STRING
,in_reply_to_screen_name STRING
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ","
;
(
id BIGINT
,在字符串处创建
,源字符串
,偏好布尔
,retweet\u count INT
,已转发\u状态结构
<
文本:字符串
,用户:STRUCT
<
sreen_名称:STRING
,名称:STRING
>
>
,实体结构
<
URL:数组
,用户_提到:数组
,hashtags:ARRAY
>
,文本字符串
,用户字符串
,在\u回复\u至\u屏幕\u名称字符串中
)
行格式分隔
以“,”结尾的字段
;
数组和结构应具有类型定义Array/Struct