Skip to main content
pshashipreetham
18-Opal
18-Opal
September 10, 2022
Solved

Property Garbage Value

  • September 10, 2022
  • 3 replies
  • 2334 views

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,

Best answer by nmilleson

@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

3 replies

19-Tanzanite
September 12, 2022

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.

Rocko
19-Tanzanite
September 12, 2022

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

 

16-Pearl
September 12, 2022

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)

nmilleson17-PeridotAnswer
17-Peridot
September 12, 2022

@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

19-Tanzanite
September 12, 2022

@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)