sudo -u hdfs sqoop import --connect jdbc:mysql://192.168.33.93:3306/leochentest --username root --password chenliangliang --table aaa --columns "id,name" --fields-terminated-by "\t" --lines-terminated-by "\n" --hive-import --create-hive-table --hive-table aaa
(1)执行导入时,实际上在内部执行了三个步骤:
- 第一步将数据导入hdfs,
- 第二步创建hive表名相同的表,
- 第三步将hdfs上数据传入hive表中