##mysql建表
create table dict_dir(
id varchar(10) comment '主键',
name varchar(20) comment '名称',
class varchar(25) comment '分类'
)comment '字典表'
insert into dict_dir values
('1_1','苹果','fruits'),
('1_2','香蕉','fruits'),
('1_3','橘子','fruits'),
('2_1','白菜','vegetables'),
('2_2','萝卜','vegetables'),
('3_1','牛肉','meat'),
('3_2','羊肉','meat');
#############hive中执行
use ods;
create table ods_dict_dir_textfile(
id string comment '主键',
name string comment '名称',
class string comment '分类'
)comment '字典表'
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES('field.delim'='\001',