输入schematool -initSchema -dbType mysql -verbose
初始化hive元数据库
hive建表
create table test0 ( day_id string, sale_nbr string, buy_nbr string, cnt int, round double ) ROW format delimited fields terminated by ',' STORED AS TEXTFILE;
导入文件hadoop fs -put /opt/software/sales.csv /user/hive/warehouse/test0
导入sales.csv文件;
清洗数据
insert overwrite table test0
select date_add('2021-09-00',cast(day_id as int)) as day_id,
sale_nbr as sale_nbr,
buy_nbr as buy_nbr,
cnt as cnt,
round as round
from test0;
标签:test0,cnt,buy,10.4,训练,nbr,id,string
From: https://www.cnblogs.com/lss1226/p/16754166.html