Skip to main content
1-Visitor
December 15, 2019
Solved

Building Predictive Analytics Model from Value Stream

  • December 15, 2019
  • 1 reply
  • 1297 views
Hi,

How to use and pass Value Stream data of Thing to ThingWorx Analytics Builder for building a predictive Analytics model.

Thanks,
Aditya

Best answer by cmorfin

Hi @adityak506 

 

Here are some options:

1) Using the CSVParser extension you can export the Stream Value data to a csv file. Then you can use this csv file to create a dataset inside ThingWorx Analytics Builder.

2) You can also do this in a automatic way:

  1. use QueryNumberPropertyHistory() service to retrieve the Value stream data
  2. loop through all the desired records to build an infotable that will represent the dataset data
  3. create a info table using the AnalyticsDatasetRef datashape to build the dataset infotable.
  4. pass this dataset infotable to the AnalyticsServer_DataThing.CreateDatasetWithDatasetRef().
    Note if you want to see the dataset in Builder, add the tags builderdataset and builderdatasetname:<your dataset name>

 

Hope this helps

Christophe

1 reply

cmorfin19-TanzaniteAnswer
19-Tanzanite
December 16, 2019

Hi @adityak506 

 

Here are some options:

1) Using the CSVParser extension you can export the Stream Value data to a csv file. Then you can use this csv file to create a dataset inside ThingWorx Analytics Builder.

2) You can also do this in a automatic way:

  1. use QueryNumberPropertyHistory() service to retrieve the Value stream data
  2. loop through all the desired records to build an infotable that will represent the dataset data
  3. create a info table using the AnalyticsDatasetRef datashape to build the dataset infotable.
  4. pass this dataset infotable to the AnalyticsServer_DataThing.CreateDatasetWithDatasetRef().
    Note if you want to see the dataset in Builder, add the tags builderdataset and builderdatasetname:<your dataset name>

 

Hope this helps

Christophe

1-Visitor
January 7, 2020

Thanks Christophe