[英]Sqoop error while loading data from MySQL to HDFS
我正在运行一个sqoop将数据从MySQL加载到HDFS。 这是代码:
sqoop import \
--connect jdbc:mysql://test.xxx.net/LIVE \
--username pitt \
--password abcd \
--query "select * from tblMfg where 1=1 and \$CONDITIONS" \
--target-dir /user/pitt/tblMfg \
--fields-terminated-by '\t' \
--null-string '' \
--null-non-string '' \
-m 1
在tblMfg上:
Value of dateCreate column: 0000-00-00 00:00:00
Data type of dateCreate column: timestamp
但是,当我运行sqoop时,会出现以下错误:
java.io.IOException: SQLException in nextKeyValue
0000-00-00 00:00:00�� 08:06:05��05����015-04-20 08:06:05�����5��5��' can not be represented as java.sql.Timestamp
有人可以解释一下这是怎么回事吗?
无法使用值0000-00-00 00:00:00初始化java.sql.timestamp。 这就是错误的原因。 尝试在dateCreate列中导入其他时间戳值,例如2011-02-15 02:02:02。 它应该工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.