一、import (mysql to hive)
1、同步textfile类型(不支持Orc或Parquet)
way 1 (同步到hive表)
sqoop import \
--connect jdbc:mysql://localhost:3306/mysql_db \
--username mysql_user \
--password mysql_pass \
--table mysql_table \
--columns mysql_column_list \
--where "1=1 " \
--hive-import \
--hive-overwrite \
--hive-table hive_db.hive_table \
--hive-partition-key hive_partition_key \
--hive-partition-value hive_partition_value \
-m 1
way 2 (同步到hdfs 需要加映射)
sqoop import \
--connect jdbc:mysql://localhost:3306/mysql_db \
--username mysql_user \
--password mysql_pass \
--table mysql_table \
--colum