sqoop同步命令从mysql同步到hive

sqoop import --connect jdbc:mysql://192.168.253.142:8066/youfanshop  --username mycat --password 123456 --query 'SELECT id,name,age,address,telphone,qq,weixin,email,sex,birthday,account FROM user WHERE $CONDITIONS' --fields-terminated-by '\t'  --null-string '**'  --target-dir /user/hive/warehouse/youfanshop.db/user  --hive-table youfanshop.user  --m 1 --hive-import

sqoop import --connect jdbc:mysql://192.168.253.142:8066/youfanshop  --username mycat --password 123456 --table producttype --fields-terminated-by '\t'  --null-string '**'  --target-dir /user/hive/warehouse/youfanshop.db/producttype  --hive-table youfanshop.producttype --m 1   --hive-import

sqoop import --connect jdbc:mysql://192.168.253.142:8066/youfanshop  --username mycat --password 123456 --table productdetail --fields-terminated-by '\t'  --null-string '**'  --target-dir /user/hive/warehouse/youfanshop.db/productdetail --hive-table youfanshop.productdetail --m 1   --hive-import


sqoop import --connect jdbc:mysql://192.168.253.142:8066/youfanshop  --username mycat --password 123456 --table product --fields-terminated-by '\t'  --null-string '**'  --m 1 --target-dir /user/hive/warehouse/youfanshop.db/product --hive-table youfanshop.product   --hive-import

sqoop import --connect jdbc:mysql://192.168.253.142:8066/youfanshop  --username mycat --password 123456 --table ordermain --fields-terminated-by '\t'  --null-string '**'  --m 1 --target-dir /user/hive/warehouse/youfanshop.db/ordermain  --hive-table youfanshop.ordermain    --hive-import


sqoop import --connect jdbc:mysql://192.168.253.142:8066/youfanshop  --username mycat --password 123456 --table orderdetail --fields-terminated-by '\t'  --null-string '**'  --m 1 --target-dir /user/hive/warehouse/youfanshop.db/orderdetail --hive-table youfanshop.orderdetail    --hive-import


sqoop import --connect jdbc:mysql://192.168.253.142:8066/youfanshop  --username mycat --password 123456 --query 'SELECT id ,merchantname ,merchantshopname ,merchantaccount ,mechantscope FROM mechant WHERE $CONDITIONS' --fields-terminated-by '\t'  --null-string '**'  --m 1 --target-dir /user/hive/warehouse/youfanshop.db/mechant --hive-table youfanshop.mechant    --hive-import
 

你可能感兴趣的:(大数据,sqoop,mysql,hive)