我正在运行一个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有人能解释一下这是怎么回事吗?
发布于 2015-04-22 22:56:17
无法使用值0000-00-00 00:00:00初始化java.sql.timestamp。这就是错误的原因。尝试在dateCreate列中使用其他时间戳值进行导入,如2011-02-15 02:02:02。应该能行得通。
https://stackoverflow.com/questions/29781457
复制相似问题