Skip to main content
Nov 6, 2019 7:32 AM UTC
Question

Data storage in Thingworx postgresql database

Hi,

I'd like to understand that how can I access or view the data stored in a DataShape, through a service created in thingworx, directly in postgresql database, which has been connected to thingworx when installed thingworx.

 

Thank You!

Muhammad Naeem Akhtar

42 replies

Nov 6, 2019 6:16 PM UTC

If you have direct access to the persistence provider, you can find the tables which are storing the data.

You can even add another JDBC connection from Thingworx to the persistence provider to pull that info.

Just be careful since you'd be touching the base Thingworx schema.

mnaeemAuthor
Nov 7, 2019 7:14 AM UTC

Thank you @PaiChung.
As you can see in the attached picture, I can see the names of datashapes that have been created on thingworx composer, but I'd like to understand that how is it possible to see the data stored in those datashapes using postgresql.

 
Nov 7, 2019 2:17 PM UTC

A datashape is just a definition.

Did you tie those datashapes to a Stream or DataTable to store actual rows?

Also what is your use case that you would need to see the data in the persistence provider directly vs. using the OOTB services available on Streams and DataTables?

Nov 10, 2019 2:46 PM UTC

Hello @mnaeem,

 

Take a look at property_vtq table.

 

/ Constantine

mnaeemAuthor
Nov 11, 2019 7:13 AM UTC

Hello @Constantine ,

 

Thank you.

Still not able to see the data. The property names are Log and Shifts.

 

Regards,

Naeem

Nov 11, 2019 7:42 AM UTC

@mnaeem, So what happens when you execute something like this?

 

SELECT convert_from(decode(value, 'escape'), 'UTF-8') FROM property_vtq WHERE id = 'AssyMachine1#Thing' AND name = 'Shifts';

 

I don't have a running Postgres to test it right now, but I hope this gives a direction.

 

/ Constantine