I'm new to apache NiFi, I have converted the Date type data into timestamp in Query Record Processor by using following query
select ${fn Convert(<ColumnName>,<Datatype as 'timestamp'>) as ColumnName from flowfile}
But I am facing issue when tried with below query to convert timestamp to datetime
select {fn CONVERT(CAST(CurrentDate as BIGINT),date)} as CurrentDate from flowfile
Error Details:
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
How can be converted the timestamp value into a DateTime using Query Record Processor?