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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Proper Method of Storing Data

byutz
1-Newbie

Proper Method of Storing Data

I have an application where we are logging several properties on different pieces of equipment.  I originally set them up with value streams because its a very quick and easy way to log data.  However, we now require that all of the properties be logged at precisely the same time, so that we can have a file with a row having 1 timestamp and all of the property values at that time.  Should I be using a regular Stream for this so that I can control the logging?   I have never used one before and it seems like the documentation talks a lot about Value Streams and very little about Streams.  Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
jasong
1-Newbie
(To:byutz)

A stream would be a better choice, yes. All you need is to look for the Add / Update / Delete StreamEntries services on the stream.

But keep in mind the current ThWx limitations: Where Should I Store My Thingworx Data?

We sometimes create a Stream for each device, so that we can keep the number of rows low, rather than store all data for all devices in a single stream. Regardless, if you are going to keep more than 1/2 a million rows in a single stream, which is not really that much, you should offload that to SQL and use the Database ThingTemplate to wire it in.

View solution in original post

2 REPLIES 2
jasong
1-Newbie
(To:byutz)

A stream would be a better choice, yes. All you need is to look for the Add / Update / Delete StreamEntries services on the stream.

But keep in mind the current ThWx limitations: Where Should I Store My Thingworx Data?

We sometimes create a Stream for each device, so that we can keep the number of rows low, rather than store all data for all devices in a single stream. Regardless, if you are going to keep more than 1/2 a million rows in a single stream, which is not really that much, you should offload that to SQL and use the Database ThingTemplate to wire it in.

byutz
1-Newbie
(To:jasong)

Jason, thanks for the info!  You already answered another question of mine on creating one stream or one per object.  Do you just create service on the thing template to handle adding the entries to a stream using the AddStreamEntry service that's built into the stream?

Top Tags