mysql中的数据导入到hdfs中后,发现有个字段被莫名其妙修改了
mysql查询到的结果如下
hdfs中的数据如下
mysql中的_NIC_ID 为空,导入hdfs竟然给改成这个样子成了: ^@他
使用的sqoop语句为
sqoop import --connect jdbc:mysql:/xxx.xxx.xxxx.xxx:3306/business_data --username user --password pass --hive-import --hive-database business_data --hive-table el_company_class_test_3 --fields-terminated-by '\t' --query "select * from el_company_class where ENTID='3249449' and \$CONDITIONS" --target-dir /user/hive/warehouse/business_data.db/el_company_class_test_3 --split-by entid --delete-target-dir --null-string '' --null-non-string ''