sqoop使用遇到的问题及解决办法mysql==>hdf,hive
sqoop大小写敏感
直接写入hive中,直接写表名,没有过滤条件,或者加where条件,分开写。
也可以写sql
–query "select id ,name,shop_id from t_table where ; " \
###正确
sqoop import -D mapred.job.queue.name=crazy
–connect jdbc:mysql:///
–username '’
–password '’
–table t_**
–where " ${condition} "
–fields-terminated-by ‘\t’
–delete-target-dir
–num-mappers 1
–hive-import
–hive-database ***
–hive-table *********
###错误
sqoop import -D mapred.job.queue.name=crazy
–connect jdbc:mysql:///
–username '’
–password '’
–table t_**
–WHERE " ${condition} "
–fields-terminated-by ‘\t’
–delete-target-dir
–num-mappers 1
–hive-import
–hive-database ***
–hive-table *********
sqoop大小写敏感