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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Transfer data collected from value stream over to Analytics Builder

RS_9963079
7-Bedrock

Transfer data collected from value stream over to Analytics Builder

Hi, I'm pushing data from a device up to Thingworx and storing it in a value stream. I'm able to display this data in a mashup widget through using the QueryPropertyValue service and was wondering if there was a way to utilize this service in order to send this value stream data straight over to the Analytics Builder.

I want to perform analytical models on this dataset, but don't know any other ways to upload data to analytics other than uploading a CSV file from my PC

1 ACCEPTED SOLUTION

Accepted Solutions

@RS_9963079 ,

 

1. You will need to note the model ID or Dataset ID returned when you create the dataset or model. You access the data/model through the services which will output in JSON. You can retrieve the dataset using the services. You wont se the CSV in the Builder either, as we ingest the dataset and transform it to fit the storage method (in the latest version of ThingWorx Analytics its stored in Apache Parquet on the server File System)

 

You can read more about the ThingWorx Analytics Architecture here: https://www.ptc.com/en/support/article/CS243525

 

2. This is dependent on which version of ThingWorx Platform Server, and ThingWorx Analytics you are using. I have provided documentation for 9.0/9.1 above

 

I should mention that we are now entering a solutions discussion which is not something I can assist you with from Technical Support process.

 

Have you leverage the training modules on PTC Developer Zone? You can find the ThingWorx Analytics Modules here: https://developer.thingworx.com/en/platform/analyze

 

Regards,

 

Neel

 

View solution in original post

7 REPLIES 7

Hello @RS_9963079 ,

 

Can you provide some more information regarding the streaming of data? Typically Analytics Builder requires the use of the flat file, but there are means to score against streaming data using the PredictionThing services or creating Analysis Events

 

https://support.ptc.com/help/thingworx/analytics/r9/en/#page/analytics%2Fanalysis-services%2FAnalysisServices_AnalysisEventsManage.html%23

 

Is this something you are sending as a Time Series / Real-Time Scoring use case?

 

Regards,

 

Neel

I'm taking data (not necessarily time series) from a sensor and pushing that up to ThingWorx through an API call where I'm able to update property values in real-time. The idea is to collect x amount of data into a value stream/infotable, move it over to Analytics, and then create a model. 

It would be great if I could score future data against the model I create. 

@RS_9963079 ,

 

Create a model via services for your use case is possible, but will require use of the ThingWorx Analytics APIs or Analytics Manager with some additional setup.

 

By default, ThingWorx Analytics Builder expects a CSV file.

 

We have another Community Topic around Real-Time Scoring that may work for your use case:

 

https://community.ptc.com/t5/IoT-Tech-Tips/How-to-score-new-data-with-ThingWorx-Analytics-8-3-x/td-p/571051#realTime

 

Please note, even though this is for an older version of ThingWorx Analytics, the method and principles have not changed significantly. Also, ThingPredictor has since been deprecated and its functionality has been rolled into Predictive Scoring Microservice in ThingWorx Analytics Server.

 

Please let me know if that topic helps.

 

Regards,

 

Neel

Can you provide a little more insight/resources into how I can create a service to get ThingWorx composer to talk to Analytics? I've been attempting to do this but am quite stuck. Additionally, would it be possible to push a csv file up to Analytics using an API call?

As for the real-time scoring link you provided, thank you so much! 

@RS_9963079 ,

 

We have an API Guide with some key information that may be useful for you:

 

https://support.ptc.com/help/thingworx/analytics/r9/en/#page/analytics%2Ftwxa-api%2Ftwxa-api.html%23

 

You can push a CSV to Analytics via API, but please not it will not be visible in Builder without the appropriate reference tags. The other item to note is, using the API methods when building models does not utilize Validation sets so you will not be able to see any charts or graphs in Builder for API submitted processes.

 

You will get the raw data returned in a JSON format.

 

You can find a sample of how to do this here:

 

https://support.ptc.com/help/thingworx/analytics/r9/en/#page/analytics%2Ftwxa-api%2Fapi_changes_9_0.html%23wwID0EJEDO

 

(Use the New format)

 

Regards,

 

Neel

Thank you so much for those links! I have two more questions:

1. If the CSV file pushed up via API is not visible in the builder, where will I be able to find it?

2. I'm finding conflicting URLS based on different ThingWorx versions- do you know which URL works for uploading to analytics?

@RS_9963079 ,

 

1. You will need to note the model ID or Dataset ID returned when you create the dataset or model. You access the data/model through the services which will output in JSON. You can retrieve the dataset using the services. You wont se the CSV in the Builder either, as we ingest the dataset and transform it to fit the storage method (in the latest version of ThingWorx Analytics its stored in Apache Parquet on the server File System)

 

You can read more about the ThingWorx Analytics Architecture here: https://www.ptc.com/en/support/article/CS243525

 

2. This is dependent on which version of ThingWorx Platform Server, and ThingWorx Analytics you are using. I have provided documentation for 9.0/9.1 above

 

I should mention that we are now entering a solutions discussion which is not something I can assist you with from Technical Support process.

 

Have you leverage the training modules on PTC Developer Zone? You can find the ThingWorx Analytics Modules here: https://developer.thingworx.com/en/platform/analyze

 

Regards,

 

Neel

 

Top Tags