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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Property Type Mapping in Value Stream

bwinslow24
12-Amethyst

Property Type Mapping in Value Stream

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

ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

4 REPLIES 4

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.

slangley
23-Emerald II
(To:bwinslow24)

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

Announcements


Top Tags