sqoop导入数据到mysql代码:
bin/sqoop export --connect jdbc:mysql://hadoop102:3306/company --username root --password 000000 --table ticket01 --num-mappers 1 --export-dir /user/hive/warehouse/ticket01 --input-fields-terminated-by "\001" --driver com.mysql.jdbc.Driver ;
尤其是input-fields-terminated-by "\001"很重要,找了很久的错误才找到是这个dog在报错。