标签:eid asto com val dex cti drive 乱码 用户
创建表的时候,comment说明字段包含中文,表成功创建之后,中文说明显示乱码
create external table movie(
userID int comment '用户ID',
movieID int comment '电影ID',
rating int comment '电影评分',
timestamped bigint comment '评分时间戳',
movieName string comment '电影名字',
movieType string comment '电影类型',
sex string comment '性别',
age int comment '年龄',
occupation string comment '职业',
zipcode string comment '邮政编码'
) comment '影评三表合一'
row format delimited fields terminated by ","
location '/hive/movie';
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';
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hivedb?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF-8</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>Root123456+</value>
</property>
</configuration>
drop table movie;
标签:eid asto com val dex cti drive 乱码 用户
原文地址:https://www.cnblogs.com/shine-rainbow/p/11386187.html