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

SQl query in JS code of ThingWorx to fetch data from PostgreSQL

AP_9587236
17-Peridot

SQl query in JS code of ThingWorx to fetch data from PostgreSQL

Can we use SQl query in JS code of ThingWorx to fetch data directly from PostgreSQL DB? If yes, How to do that ?

1 ACCEPTED SOLUTION

Accepted Solutions

@AP_9587236 That is one of the platform features, and it is described in detail in the Help Center, here. Basically we allow you to interact with any database which has a JDBC driver.

If you're targeting directly a PostgreSQL server, you might not need any additional JDBC driver, as the platform might contain the driver already, if you're using the PostgreSQL version.

 

Please note that direct access to ThingWorx's PostgreSQL database is not supported, since it's being used only internally by the platform. Due to this, we do not provide documentation about ThingWorx's SQL tables and any code that relies on direct access to the database is not guaranteed to work between ThingWorx upgrades/updates, since those tables might be changed without warning.

ThingWorx provides a rich REST API, which is the only interface you should use to access data in the platform (generally speaking).

You can, however, interact with any other PostgreSQL server you might want to deploy, just not with the one used by the Platform.

View solution in original post

3 REPLIES 3

@AP_9587236 That is one of the platform features, and it is described in detail in the Help Center, here. Basically we allow you to interact with any database which has a JDBC driver.

If you're targeting directly a PostgreSQL server, you might not need any additional JDBC driver, as the platform might contain the driver already, if you're using the PostgreSQL version.

 

Please note that direct access to ThingWorx's PostgreSQL database is not supported, since it's being used only internally by the platform. Due to this, we do not provide documentation about ThingWorx's SQL tables and any code that relies on direct access to the database is not guaranteed to work between ThingWorx upgrades/updates, since those tables might be changed without warning.

ThingWorx provides a rich REST API, which is the only interface you should use to access data in the platform (generally speaking).

You can, however, interact with any other PostgreSQL server you might want to deploy, just not with the one used by the Platform.

Okay. Then how to interact with any other PostgreSQL server which is not used by the Platform?

Hi @AP_9587236,

The answer to your question is the first two lines of my previous reply.

Have you read that Help Center entry and can you let us know what are the topics you need help from there?

Top Tags