gpt4 book ai didi

hadoop - 编译语句时出错:失败:ParseException第4:22行不匹配,输入 ','期望<靠近 'array'在列表类型中

转载 作者:行者123 更新时间:2023-12-02 21:59:21 27 4
gpt4 key购买 nike

我正在尝试使用Hadoop Hive查询创建以下内容:

create table tweets (
created_at string,
entities struct <
hashtags: array ,
text: string>>,
media: array ,
media_url: string,
media_url_https: string,
sizes: array >,
url: string>>,
urls: array ,
url: string>>,
user_mentions: array ,
name: string,
screen_name: string>>>,
geo struct <
coordinates: array ,
type: string>,
id bigint,
id_str string,
in_reply_to_screen_name string,
in_reply_to_status_id bigint,
in_reply_to_status_id_str string,
in_reply_to_user_id int,
in_reply_to_user_id_str string,
retweeted_status struct <
created_at: string,
entities: struct <
hashtags: array ,
text: string>>,
media: array ,
media_url: string,
media_url_https: string,
sizes: array >,
url: string>>,
urls: array ,
url: string>>,
user_mentions: array ,
name: string,
screen_name: string>>>,
geo: struct <
coordinates: array ,
type: string>,
id: bigint,
id_str: string,
in_reply_to_screen_name: string,
in_reply_to_status_id: bigint,
in_reply_to_status_id_str: string,
in_reply_to_user_id: int,
in_reply_to_user_id_str: string,
source: string,
text: string,
user: struct <
id: int,
id_str: string,
name: string,
profile_image_url_https: string,
protected: boolean,
screen_name: string,
verified: boolean>>,
source string,
text string,
user struct <
id: int,
id_str: binary,
name: string,
profile_image_url_https: string,
protected: boolean,
screen_name: string,
verified: boolean>
)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
STORED AS TEXTFILE;

我收到的错误是:

编译语句时出错:失败:ParseException行4:22输入','不匹配,期望列表类型中<数组附近

任何帮助,将不胜感激。

最佳答案

来自https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTableAsSelect(CTAS)

当你使用

array_type
: ARRAY < data_type >

where data_type
: primitive_type
| array_type
| map_type
| struct_type
| union_type

关于hadoop - 编译语句时出错:失败:ParseException第4:22行不匹配,输入 ','期望<靠近 'array'在列表类型中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30035204/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com