sqoop迁移hive数据到mysql提示如下错误

Caused by: java.lang.RuntimeException: Can't parse input data: '{"com_juzi_id":"0","com_status_name":"正常","cat_name":"智能硬件","com_city":"北京","com_xiniu_id":"207573","com_logo_archive":"https://api.xiniudata.com/file/58a1e4e2b1d37e67782669a3","com_des":"请输入公司介绍,10-1000字","com_name":"**科技","com_registered_name":"北京**科技有限公司","tags":"[\"7c594ee93cbdf8a3ef8c9137591cc231\"]","cx_company_id":"00011c2190c6226a34dc4b9a269034e3"}'
	at cx_company_detail_dev_cx.__loadFromFields(cx_company_detail_dev_cx.java:2129)
	at cx_company_detail_dev_cx.parse(cx_company_detail_dev_cx.java:1882)
	at org.apache.sqoop.mapreduce.TextExportMapper.map(TextExportMapper.java:89)
	... 10 more
Caused by: java.util.NoSuchElementException
	at java.util.ArrayList$Itr.next(ArrayList.java:854)
	at cx_company_detail_dev_cx.__loadFromFields(cx_company_detail_dev_cx.java:1934)

原因:数据来源于kafka,当时建表一路加上了ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe';

最终分区表建表可以不加,去掉即可sqoop导出,否则hive底层存储于hue查询出来的不一致,但hue查询出来的成功!

你可能感兴趣的:(Sqoop)