用sqoop把数据从hdfs 导入数据到mysql时出现导入失败报错(export failed)

hdfs 导入数据到mysql时出现导入失败(export failed)
原因:–cloumns的列与hdfs中数据的列未对应
就比如hdfs中数据是:张三,23,男
而你的HDFSToMySQl.conf中的–cloumns设置的是age,gender,name
这就不对应,然后就导入失败,需要设置成name,age,gender与之对应

还有一种可能就是你的字段长度小了,调整MySQL标的字段长度

猜你喜欢

转载自blog.csdn.net/qq_43278189/article/details/120868239