使用sqoop将HIVE中的数据输出带Mysql中
生活随笔
收集整理的這篇文章主要介紹了
使用sqoop将HIVE中的数据输出带Mysql中
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
hive中的數據:
mysql中的表:
然后安裝sqoop:
https://blog.csdn.net/qq_41946557/article/details/102890594
里面有詳細步驟:
然后只需一條命令
sqoop export --connect jdbc:mysql://henu1:3306/gamedata --username root --password 123 --table n_days_stat --num-ma ppers 1 --export-dir /user/hive/warehouse/n_days_stat --input-fields-terminated-by "\001"sqoop export \
--connect jdbc:mysql://henu1:3306/gamedata \
--username root \
--password 123 \
--table n_days_stat \
--num-mappers 1 \
--export-dir /user/hive/warehouse/n_days_stat \
--input-fields-terminated-by "\001"
ok!!!?
?
刷新mysql中的n_days_stat:
?
導入成功!!!
總結
以上是生活随笔為你收集整理的使用sqoop将HIVE中的数据输出带Mysql中的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: tar中的zxvf都是什么?
- 下一篇: Shell 脚本的时间的加减,以及时间差