开启HIVE中分区表支持中文字段

进入hive表:

use hive;

#修改hive database编码

alter database hive default character set utf8;

#修改table编码

alter table PARTITIONS default character set utf8;

alter table PARTITION_KEY_VALS default character set utf8;

alter table SDS default character set utf8;

#修改字段编码

alter table PARTITIONS modify column PART_name varchar(190) character set utf8;

alter table PARTITION_KEY_VALS modify column PART_KEY_VAL varchar(256) character set utf8;

alter table SDS modify column LOCATION varchar(4000) character set utf8;

上一篇:JavaSE学习笔记第二弹——对象和多态(下)


下一篇:python——解决字节转义的问题