Hello!

I have  a JSON file like so:

{"PROJECT_KEY":"XYZ ","LAST_METRIC_DATE":"1550648697"}

I put this into EvaluateJsonPath and create the following attributes:

                Attribute:            lastMetricDate
JSON path:          $.LAST_METRIC_DATE

Which works, the file gets an attribute lastMetricDate which equals 1550648697

Then in the next InvokeHttp processor I need to use this attribute as a date 
however, and here I have trouble with the expression language. Because in the 
URL field when I use when I use:

                
http://example.com/?since=${lastMetricDate:toNumber():format("yyyy-MM-dd'T'HH:mm:dd'+0800'",
 "Asia/Singapore")}

I get "?since=1970-01-01 ..."

I also tried

                ${lastMetricDate:format("yyyy-MM-dd'T'HH:mm:dd'+0800'", 
"Asia/Singapore")}

But same result.

Is there any way I can tell Nifi that this is a UNIX timestap that should be 
formattable using the "format(...)" function.

Thanks!

Max

=============================================================================== 
Please access the attached hyperlink for an important electronic communications 
disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=============================================================================== 

Reply via email to