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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Property Garbage Value

pshashipreetham
17-Peridot

Property Garbage Value

Hi, 

The properties are getting logged in InfluxDB Value Stream, when the Table/Measurement data is purged, the Latest/lastvalue is still seen on the Thing.

Shashi_Preetham_0-1662789513249.png

When Checked through QueryNamedPropertyHistory, there are no values for the property;;

Shashi_Preetham_1-1662789567939.png

Did following testing:
1. Restarted the Thingworx and checked, still the values exist

2. Cleared the Tomcat Cache and checked. still the values exist.

3, Imported the Thing from one Env to another Env, the values are still reflecting in another env, but again can't see in the QueryNamedPropertyHistory.


So if not DB, where are these values are getting stored ?

Thanks,

Shashi Preetham
1 ACCEPTED SOLUTION

Accepted Solutions

@pshashipreetham ,

 

The current values of the persisted properties are stored in the property_vtq table I believe.  The value is just stored as a byte array so multiple types can be represented in the same database table.

 

-Nick

View solution in original post

7 REPLIES 7

What you're seeing there is one of the core features of ThingWorx, called persistence. It has been there from day 1 and it acts in the following way: if a property's "persisted" checkbox is enabled, the the system will store the last value of that property (only the last value). That's how ThingWorx remembers that property value after platform or Thing restart. If you disable that checkbox, it will not remember it.

"persisted" has no relationship with "logged". They work in different ways, using separate subsystems.

This is also explained in this Help Center section, albeit not that specific.

In short: standard behavior.

Persistent vs logged properties are also discussed deeply in this tech tip and its comments:

https://community.ptc.com/t5/IoT-Tips/Persistent-vs-Logged-Properties/ta-p/819410

 

nmutter
14-Alexandrite
(To:pshashipreetham)

When you exported the entity in the .xml file you can see the actual persisted value. In tag "ThingProperties" - e.g.

nmutter_0-1662983770345.png

These values will also be imported into your other instance via the .xml exported file.

 

They are also persisted in the database but not in a value stream but in a separate table which (of my knowledge) you cannot clear from Composer (only with SQL query).

 

Edit: I do not know how you can remove these values. You could just export the xml - remove the values - import it again. But this is quite some effort (depending on the amount of assets)

@pshashipreetham ,

 

The current values of the persisted properties are stored in the property_vtq table I believe.  The value is just stored as a byte array so multiple types can be represented in the same database table.

 

-Nick

@nmilleson Correct now, but as with any internal technical details, good to keep in mind that they may change at any time without warning.

(Of course with the APIs being the approved route into the information provided here)

Hi,

Thanks @nmilleson  and @VladimirRosu , for the info you have provided, helped a lot and solved our issue.

Thanks,

Shashi Preetham

Hi @nmilleson and @VladimirRosu , 

One question, Over here in our use case, Model DB is Postgres and Time Series DB is INFLUX DB, so the Thing is connected to the Value Stream of InfluxDB, the properties values will be stored in the INFLUX DB. In this scenario also will the Properties Values are stored in the property_vtq when purged ?

Because we are doing an Purging on InFluxDB Timeseries data which is more than One year.

Thanks,

Shashi Preetham
Top Tags