Article - CS415472

Error when scoring a time series model with DateTime as temporal feature "Error executing service XXXX Message :: Could not process request: [For input string: "

Modified: 03-May-2024   


Applies To

  • ThingWorx Analytics 9.3 to 9.5

Description

  • Following error is received when scoring new data against a time series model that uses DateTime data type for the TEMPORAL feature
WARN  c.t.a.a.r.SyncPredictiveScoringResource - Failed to score with:PredictiveScoringRequest [dataSource=DatasetRef [dataRef=CsvBodyDataRef [hasHeader=true, uri=body:///, format=csv, data=[data] ], schemaRef=null, filter=, exclusions=[]], modelUri=results:/models/XXXX, scoringName=ignored, importantFieldCount=0, goalName=null, description=null, causalTechnique=FULL_RANGE, preferredCategoricalValues=null, categoricalLimit=null, tags=null, identifierFields=null]
java.lang.NumberFormatException: For input string: "2016-03-08T02:00:00.000Z"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Long.parseLong(Long.java:692)
	at java.base/java.lang.Long.valueOf(Long.java:1144)
	at com.thingworx.analytics.unicron.timeseries.TimeSeriesTransformer$Builder.lambda$createRowToKeyedRowFunction$50e661ed$1(TimeSeriesTransformer.java:456)
	at com.thingworx.analytics.unicron.timeseries.TimeSeriesTransformer$Builder.lambda$createRowToKeyedRowFunction$114dfc31$1(TimeSeriesTransformer.java:459)
...
  • Scoring is done using the RealtimeScore service:
let dsref = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({
    dataShapeName: "AnalyticsDatasetRef"
});


let newEntry = {
   // datasetUri: "body:/", // STRING
    format: undefined, // STRING
    filter: undefined, // STRING
    exclusions: undefined, // INFOTABLE {"dataShape":"GenericStringList"}
    data: me.scoreData // INFOTABLE

};
dsref.AddRow(newEntry);

var predictiveScores = Things["AnalyticsServer_PredictionThing"].RealtimeScore({
	modelUri: "results:/models/" + me.modelID,
    datasetRef: dsref
});

 
This is a printer-friendly version of Article 415472 and may be out of date. For the latest version click CS415472