Time series prediction using datetime type as temporal
- April 11, 2024
- 2 replies
- 4798 views
I uploaded a time series dataset setting the temporal op type to a field containing a ISO parsed datetime and setting the type of this column as a DateTime. I took caution to set the time sampling interval to the correct number of miliseconds (every row was a 1 minute delta so samplig was 60,000)
I then trained a time series model with this dataset. No issues there.
Now when I try to get a prediction I get the following message:
Error executing service predWaterFlowDatetime Message :: Could not process request: [For input string: "2016-03-08T02:00:00.000Z"
I'm basing my code and data on this tutorial: https://community.ptc.com/t5/IoT-Tips/TWX-Analytics-How-to-Build-and-Operationalize-a-Time-Series/ta-p/818275
In this tutorial they use a simple integer as the temporal field, I got that working no problem. I've now adapted the code, datashape, dataset metadata and model to use this datetime typed column as the temporal field, but something is not working. I've tried changing a lot a things to no avail.
That error message is the closest I've gotten. It appears that the data I'm sending to Analytics for the prediction is typed as a string and it is not able to parse it. Or simply Analytics doesn't have this capability, which would be weird considering it managed to train a model using a DateTime type.
I'm out of ideas, has anyone managed to make time series predictions using DateTime data as temporal field?

