3

我是 apache NiFi 的新手,我已使用以下查询将日期类型数据转换为查询记录处理器中的时间戳

select ${fn Convert(<ColumnName>,<Datatype as 'timestamp'>) as ColumnName from flowfile}

但是当尝试使用以下查询将时间戳转换为日期时间时,我遇到了问题

select {fn CONVERT(CAST(CurrentDate as BIGINT),date)} as CurrentDate from flowfile

错误详情:

QueryRecord[id=0e0d33b4-0165-1000-9db1-e7d0dad2240d] Unable to query StandardFlowFileRecord[uuid=b04e508b-675e-444b-8a87-d77b77b802cd,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1533555234293-23, container=default, section=23], offset=3200, length=134],offset=0,name=AdventureWorks.csv,size=134] due to null: java.lang.NullPointerException

如何使用查询记录处理器将时间戳值转换为 DateTime?

4

1 回答 1

0

不确定这是否解决了它,但最突出的是第一个表达式以美元符号开头,而第二个表达式则没有。

于 2020-07-02T07:39:45.790 回答