Skip to main content
1-Visitor
November 6, 2019
Question

Data storage in Thingworx postgresql database

  • November 6, 2019
  • 2 replies
  • 21248 views

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

2 replies

22-Sapphire I
November 6, 2019

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.

mnaeem1-VisitorAuthor
1-Visitor
November 7, 2019

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.

 
22-Sapphire I
November 7, 2019

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?

18-Opal
November 10, 2019

Hello @mnaeem,

 

Take a look at property_vtq table.

 

/ Constantine

mnaeem1-VisitorAuthor
1-Visitor
November 11, 2019

Hello @Constantine ,

 

Thank you.

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

 

Regards,

Naeem

18-Opal
November 11, 2019

@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