Trying To Solve remove the timestamp format conversion error by using “UpdateAttribute” processor i.e. ConvertJSONtoSQL-> UpdateAttribute--> PutSQL

99封情书 提交于 2019-12-11 01:44:34

问题


From This Answer

Same issue but no luck in my case i'm using ConvertJsonToSql---->(Relationship--SQL,Original)---->Update Attribute(Poperty from your answer)------>PutSql. java.sql.SQLDataException :The value of the sql.args.28.value is Mon Oct 09 23:55:23 which cannot be converted to a timestamp.

  1. In Database date is storing in mysql datetime format 2017-09-11 14:26:13.
  2. NiFi flow file from Capture Change Mysql is showing like Mon Sep 11 19:56:13 IST 2017.
  3. JoltTransform Json also same and while converting form json to sql flow file attribute value of sql.args.27.type is 93 and sql.args.27.value is Mon Oct 09 23:38:55.

any suggestions are welcome and appreciated.


回答1:


I got answer for this In updateattribute processor property: sql.args.27.value and value :${sql.args.27.value:toDate("EEE MMM dd HH:mm:ss z yyyy"):toNumber():format("yyyy-MM-dd HH:mm:ss.SSS")}



来源:https://stackoverflow.com/questions/46702722/trying-to-solve-remove-the-timestamp-format-conversion-error-by-using-updateatt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!