impala 建表时报错,不支持中文

1.错误信息

(1366, "Incorrect string value: '\\xE6\\x8E\\x88\\xE6\\x9D\\x83...' for column 'search' at row 1")

 

(1)查看元数据hive库中的编码格式

impala 建表时报错,不支持中文

 

 

 

(2)更改hive数据库字符集

alter database hive charset utf8;

 

(3)更改字段类型

alter table COLUMNS_V2 modify column COMMENT varchar(256) character set utf8;

alter table TABLE_PARAMS modify column PARAM_VALUE varchar(4000) character set utf8;

alter table PARTITION_PARAMS  modify column PARAM_VALUE varchar(4000) character set utf8;

alter table PARTITION_KEYS  modify column PKEY_COMMENT varchar(4000) character set utf8;

alter table  INDEX_PARAMS  modify column PARAM_VALUE  varchar(4000) character set utf8;

 

在impala 页面报错:1366, "Incorrect string value

mysql> use hue;

mysql> ALTER TABLE desktop_document2 modify column name varchar(255) CHARACTER SET utf8;

mysql> ALTER TABLE desktop_document2 modify column description longtext CHARACTER SET utf8;

mysql> ALTER TABLE desktop_document2 modify column search longtext CHARACTER SET utf8;

 

上一篇:修改浏览器请求头插件Modify Headers


下一篇:RHEL8和CentOS8怎么重启网络