Apache nifi NiFI:无法在JSON内将unix时间戳转换为日期

Apache nifi NiFI:无法在JSON内将unix时间戳转换为日期,apache-nifi,Apache Nifi,我有一个类似的JSON: [ { "timestamp_from" : 1619426381, "timestamp_to" : 1619512780, "group_id" : "48427976" }, { "timestamp_from" : 1619339981, "timestamp_to" : 1619426380, "commen

我有一个类似的JSON:

[ {
  "timestamp_from" : 1619426381,
  "timestamp_to" : 1619512780,
  "group_id" : "48427976"
}, {
  "timestamp_from" : 1619339981,
  "timestamp_to" : 1619426380,
  "comments" : 49,
  "copies" : 4,
  "hidden" : 68,
  "likes" : 233,
  "subscribed" : 225,
  "unsubscribed" : 29,
  "group_id" : "48427976"
}, {
  "timestamp_from" : 1619253581,
  "timestamp_to" : 1619339980,
  "comments" : 72,
  "copies" : 7,
  "hidden" : 87,
  "likes" : 236,
  "subscribed" : 232,
  "unsubscribed" : 19,
  "group_id" : "48427976"
}]
我想将
timestamp
字段转换为
yyyy-MM-dd
格式的日期。我尝试将
UpdateRecord
用于:

  • /timestamp_from${field.value:append('000'):format('yyyy-MM-dd')}
    -
引发的异常
无法使用模式[“timestamp_from:”INT“,”timestamp_to:”INT“,”group_id:”STRING“,”comments:”INT“,”copies:”INT“,”hidden:”INT“,”likes:”INT“,”订阅“:”INT“,”取消订阅“:”INT”]由于java.lang.NumberFormatException,因此作为JSON对象:对于输入字符串:“2021-04-26”:对于输入字符串:“2021-04-26”

  • ${field.value:toString():append('000'):format('yyyy-MM-dd')}
    -相同错误
如果我手动更改JSON并用
包装时间戳值,它会工作。但是JSON没有整数引号。如何修复它