Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hi,
I cant find any documentation on the property_type column in the value stream. I would like to know the mapping between the ENUM stored in the value stream and the property type. For example property_type = 22 maps to an Integer. I would like the full list.
Thanks,
Brandon
Solved! Go to Solution.
Got it. Still, there's no official mapping available, for the reasons shared before.
I'm a fan of digging into details, so alternatives that use the official platform API would be:
-if you're doing reads from the ValueStream, then you can use the various Query.....PropertyHistory services available at a Thing level to get your data through REST.
-If you're doing writes to the ValueStream I would deffinitely use only the ThingWorx way (logged properties), because of the buffering mechanism that we use for this situation.
If you deffinitely need to go to the DB, for any specific reason, what I would do is the following:
-Create a Thing with Property, set it to logged and set different values while changing its type
-in this way you should obtain a small amount of entries (=basetypes) in the VS that you can read and consult the data type.
Note: Be aware that ThingWorx 9.0 has a completely new Active-Active clustering mode, that can scale quite nice now.
Hi @bwinslow24
Can you describe what you need to do that can't be achieved without accessing directly the database?
The internal database logic of the platform is not an official platform API, so it will not be documented. (Obviously, we do not recommend to interact directly with the Database). Also, because of the same reason, there's no restrictions on changing its structure between versions, so keep this in mind if you really need to play with it.
Hey @VladimirRosu,
We build all of our microservices outside of the thingworx platform and interact directly with the db. This is for many reasons. We want the thingworx application to focus on ingesting data and alerting. Also complex code is not testable, scalable, or maintainable within the platform. I just need a list of the property type mappings.
Got it. Still, there's no official mapping available, for the reasons shared before.
I'm a fan of digging into details, so alternatives that use the official platform API would be:
-if you're doing reads from the ValueStream, then you can use the various Query.....PropertyHistory services available at a Thing level to get your data through REST.
-If you're doing writes to the ValueStream I would deffinitely use only the ThingWorx way (logged properties), because of the buffering mechanism that we use for this situation.
If you deffinitely need to go to the DB, for any specific reason, what I would do is the following:
-Create a Thing with Property, set it to logged and set different values while changing its type
-in this way you should obtain a small amount of entries (=basetypes) in the VS that you can read and consult the data type.
Note: Be aware that ThingWorx 9.0 has a completely new Active-Active clustering mode, that can scale quite nice now.
Hi @bwinslow24.
If the previous response answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.
Thank you for participating in our community!
Regards.
--Sharon