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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

How can we convert byte in property_vtq table when fetching data from postgresql

bmdeshmukh18
10-Marble

How can we convert byte in property_vtq table when fetching data from postgresql

Hi,

 

I am trying to fetch data from postgresql property_vtq table for external application.

But the data is coming in binary format for value column as seen below.

 

bmdeshmukh18_1-1655203556343.png


Further checking the data type of value column, it is showing as bytea.
How can we get this format converted to represent some sensible data as string, integer or datetime according to the property basetype configured.

bmdeshmukh18_0-1655203472100.png

 

 

Thanks and Regards,

Bhushan

ACCEPTED SOLUTION

Accepted Solutions

The property_vtq table is an internal SQL table used by the ThingWorx platform.

It is not intended to be used directly by external applications, and, as a consequence, it is not documented and its structure might change at any time in the future, based on the platform needs.

So, whatever solution you might design based on direct access of this table is not supported.

Instead, you should use ThingWorx's REST API, and get directly the Thing property values.

Do note that since you only need Property values, if you use the REST API, those will be read directly from the memory, which makes it (way) more optimized compared to a database call.

 

View solution in original post

1 REPLY 1

The property_vtq table is an internal SQL table used by the ThingWorx platform.

It is not intended to be used directly by external applications, and, as a consequence, it is not documented and its structure might change at any time in the future, based on the platform needs.

So, whatever solution you might design based on direct access of this table is not supported.

Instead, you should use ThingWorx's REST API, and get directly the Thing property values.

Do note that since you only need Property values, if you use the REST API, those will be read directly from the memory, which makes it (way) more optimized compared to a database call.

 

Announcements


Top Tags