Python全系列 教程
3567个小节阅读:5930.5k
目录
鸿蒙应用开发
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
MySQL创建数据表
xxxxxxxxxx
create table if not exists td_userlog_year_month_day_week(
user_id int comment '买家id',
cat_id int comment '分类id',
brand_id int comment '品牌id',
item_id int comment '产品id',
seller_id int comment '卖家id',
time_year int comment '年',
time_month int comment '月',
time_day int comment '日',
time_stamp bigint comment '时间戳 单位秒',
week_year int comment '一年中的第几周',
week_day int comment '星期几'
);
编写数据从Hive到MySQL同步脚步
xxxxxxxxxx
[root@node3 ~]# vim export_td_userlog_year_month_day_week.txt
xxxxxxxxxx
export
--connect
jdbc:mysql://node1:3306/taobao
--username
root
--password
123456
-m
1
--table
td_userlog_year_month_day_week
--columns
user_id,cat_id,brand_id,item_id,seller_id,time_year,time_month,time_day,time_stamp,week_year,week_day
--export-dir
/user/hive_remote/warehouse/taobao.db/td_userlog_year_month_day_week
执行测试:
xxxxxxxxxx
[root@node3 ~]# sqoop --options-file export_td_userlog_year_month_day_week.txt