Kettle imestamp:无法从索引 22 处的结果集中获取时间戳
使用kettle进行etl时,表输入预览出现报错:
org.pentaho.di.core.exception.KettleDatabaseException:
Couldn't get row from result set
Timestamp : Unable to get timestamp from resultset at index 5
Value '37467412015-04-18 13:58:472015-04-18 13:58:4700000-00-00 00:00:001:138' can not be represented as java.sql.Timestamp
at org.pentaho.di.core.database.Database.getRow(Database.java:2397)
at org.pentaho.di.core.database.Database.getRow(Database.java:2368)
at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:145)
at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
连接MySQL读取包含timestamp类型的表,经google,说是MySQL本身的问题。解决方法也很简单,在Spoon数据库连接中,打开选项添加一行命令参数:
zeroDateTimeBehavior=convertToNull