Skip to main content

I have a custom source that is appending zeros to the end of the microseconds which may be the cause of FN seeing it as a Float. Would it be possible in future versions to force a string data type so it might be manipulated or is there any other way I can manage this from the FN side?  

 

Excited to begin using the date and timestamp functions.  Do you think they will become data types that could be used in the extractJson strings eventually?

 

Custom source value: 

 

extractJson code

  • If i change the value to Number or String the query errors because it sees that value as a Float

select code

 

Result

 

 

Hi @dakotaglory ,

The extractJson function already supports Timestamp and Date in 24.9. For example, this query should work on 24.9:

text =
"""
{
"prop-1": 0,
"prop-2": 1562607599000000,
"prop-3": "2000-01-01T00:00:00Z",
"prop-4": "2024-09-23"
}
""";

>extractJsonn{"prop-1": Number, "prop-2": Number, "prop-3": Timestamp, "prop-4": Date}](text)
]

What version of Forward are you using? You should be able to see that in the question mark button at the top-right of the FN GUI.


 

 

Below is the result using Timestamp in the extractJson function.

 

Out of curiosity I added six zeros to the seconds function. It reads it “correctly” so it appears extractJson interprets the custom source (with six zeros) as a Float.

 


Hi @dakotaglory - The engineers requested additional custom source data to troubleshoot this error. The best way to share this is through the Forward Support Portal. You can log in to the support portal with your community login. 

 

Dave


Reply