2023-02-25 446
工作太忙,隔了好久的HIVE没玩,捡起来重新学习下,建表出现错误如:
Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaExcColumn length too big for column ‘TYPE_NAME’ (max = 21845)
为了后面导入CSV数据,建表语句如下:
create table t1(
id string
,name string
,hobby string
,age string
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
with serdeproperties (
"separatorChar" = ",",
"quoteChar" = "'",
"escapeChar" = "\\"
) tblproperties("skip.header.line.count"="1")
解决方法:错误一直报数据类型的问题,而 hive 建表类型基本为 string,是hive使用MySQL存储元数据编码问题
导入语句:
alter database hive character set latin1;
原文链接:https://77isp.com/post/34474.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态