cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

How do I send values for data property of thing created Using ThingPredictor and Model in Thingworx?

ahawaldar-2
10-Marble

How do I send values for data property of thing created Using ThingPredictor and Model in Thingworx?

Hi,

I created a thing using CreateOrUpdateThingTemplateForModel service of TW.AnalysisServices.ModelManagementServicesAPI resource. After mapping properties in thingworx analytics manager I see few properties like goalName,causalTechnique,data,dataCollection,importantFieldCount,key . ​ Now I am able to test the prediction scoring feature by setting values in "data" property manually. These values are being sent to thingworx analytics manager and I see the predicted values in dataCollection property.


My question is how do I set the values in data property so that these values are sent to thingworx analytics manager. Is there any service to do so?


I manually created a service as below but no luck as these values were not sent to thingworx analytics manager. Please help me to understand this. Appreciate your help.


var params = {

  infoTableName : "InfoTable",

  dataShapeName : "ThingPredictor.bearing_data_Condition_417.InputParamsdataDataShape"

};

var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);

var newEntry = new Object();

newEntry._B1 = 131.73;

newEntry._B2 = 167.94;

newEntry._B3 = 350.01;

newEntry._B4 = 561.75;

newEntry._B5 = 267.51;

newEntry._B6 = 349.78;

newEntry._B7 = 130.8;

newEntry._B8 = 29.01;

newEntry._condition = 0;

newEntry.key = 0;

logger.warn("Created info table");

result.AddRow(newEntry);

// setting the property data

me.data = result;


2 REPLIES 2

Hello Azim,

Please refer the below link and suggest if it solves your issue:

Video Link : 1817

Thanks,

Prakhar Shubham

Hello Prakhar Shubham​,

This video shows setting values for property "data" manually.  I have to do it through service so that this service I can use on mashup. Any suggestions?

Thanks,

Azim

Announcements


Top Tags