报错的主要内容如下,意思很清楚,就是不能报那个日期字符串转化成日期,可是,很明显,格式是正确的
2020/04/10 15:12:12 - 插入 / 更新.0 - ERROR (version 8.2.0.0-342, build 8.2.0.0-342 from 2018-11-14 10.30.55 by buildguy) : Error in step, asking everyone to stop because of:
2020/04/10 15:12:12 - 插入 / 更新.0 - ERROR (version 8.2.0.0-342, build 8.2.0.0-342 from 2018-11-14 10.30.55 by buildguy) : org.pentaho.di.core.exception.KettleValueException:
2020/04/10 15:12:12 - 插入 / 更新.0 - Date : Unable to compare with value [String(100)]
2020/04/10 15:12:12 - 插入 / 更新.0 -
2020/04/10 15:12:12 - 插入 / 更新.0 - birthdate_1_1 String(100) : couldn't convert string [1978/01/06 00::00:00.000] to a date using format [yyyy/MM/dd HH:mm:ss.SSS] on offset location 14
2020/04/10 15:12:12 - 插入 / 更新.0 - 1978/01/06 00::00:00.000
2020/04/10 15:12:12 - 插入 / 更新.0 -
2020/04/10 15:12:12 - 插入 / 更新.0 -
2020/04/10 15:12:12 - 插入 / 更新.0 - at org.pentaho.di.core.row.value.ValueMetaBase.compare(ValueMetaBase.java:3832)
2020/04/10 15:12:12 - 插入 / 更新.0 - at org.pentaho.di.trans.steps.insertupdate.InsertUpdate.lookupValues(InsertUpdate.java:138)
2020/04/10 15:12:12 - 插入 / 更新.0 - at org.pentaho.di.trans.steps.insertupdate.InsertUpdate.processRow(InsertUpdate.java:299)
2020/04/10 15:12:12 - 插入 / 更新.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2020/04/10 15:12:12 - 插入 / 更新.0 - at java.lang.Thread.run(Thread.java:745)
2020/04/10 15:12:12 - 插入 / 更新.0 - Caused by: org.pentaho.di.core.exception.KettleValueException:
2020/04/10 15:12:12 - 插入 / 更新.0 - birthdate_1_1 String(100) : couldn't convert string [1978/01/06 00::00:00.000] to a date using format [yyyy/MM/dd HH:mm:ss.SSS] on offset location 14
2020/04/10 15:12:12 - 插入 / 更新.0 - 1978/01/06 00::00:00.000
2020/04/10 15:12:12 - 插入 / 更新.0 -
2020/04/10 15:12:12 - 插入 / 更新.0 - at org.pentaho.di.core.row.value.ValueMetaBase.convertStringToDate(ValueMetaBase.java:939)
2020/04/10 15:12:12 - 插入 / 更新.0 - at org.pentaho.di.core.row.value.ValueMetaBase.getDate(ValueMetaBase.java:2302)
2020/04/10 15:12:12 - 插入 / 更新.0 - at org.pentaho.di.core.row.value.ValueMetaBase.convertData(ValueMetaBase.java:3858)
2020/04/10 15:12:12 - 插入 / 更新.0 - at org.pentaho.di.core.row.value.ValueMetaBase.compare(ValueMetaBase.java:3829)
2020/04/10 15:12:12 - 插入 / 更新.0 - ... 4 more
2020/04/10 15:12:12 - 插入 / 更新.0 - Caused by: java.text.ParseException: 1978/01/06 00::00:00.000
2020/04/10 15:12:12 - 插入 / 更新.0 - at org.pentaho.di.core.row.value.ValueMetaBase.convertStringToDate(ValueMetaBase.java:930)
2020/04/10 15:12:12 - 插入 / 更新.0 - ... 7 more
然后疯狂在网上淘资料,始终没有找到一个解决办法,最后无意中看到了kettle自带的一个转换控件,抱着试一下的心态,竟然成功了,具体如下:
如果有小伙伴遇到类似的问题,可以尝试一下哦。
来源:oschina
链接:https://my.oschina.net/marner/blog/4291887