Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Can we use SQl query in JS code of ThingWorx to fetch data directly from PostgreSQL DB? If yes, How to do that ?
Solved! Go to Solution.
@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.
@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?