1 Reply Latest reply on Jan 15, 2018 12:21 PM by rsastry RSS
    rsastry Newbie

    Access thing details from Postgres DB

    Hi Team,

    I am running my thingworx instance at my localhost and configured postgres sql.

    I am able to access (create things) and perform other activities in thingworx console.

    I am sure the data shape, templates etc will be stored in postgres DB. But unable to access those datas in table.

    Whenever I select (*) or check for count of rows of a table like (data_shape etc or all the 48 tables in postgres DB) the count is zero.


    Please let me what must be the issue.

    Thanks in advance!

      • Re: Access thing details from Postgres DB
        aminec Apprentice

        Hi Ram,


        I am assuming that you are using PostgreSQL as your persistent provider.

        In that case are you trying to access those tables from withing the Thingworx platfrom or by directly accessing the DB ?

        Please make sure that you have followed the steps below in order to confirm that you are using PostgreSQL as your persistent Provider :


        • Configuration of  Persistent Provider:      
          1. Go to Data Storage Tab and add new Persistent Providers
          2. Under General Information tab select the appropriate PersistenceProviderPackage
          3. Under Configuration tab set following details
            • JDBC URL:jdbc:postgresql://localhost:5432/thingworx
            • Username: thingworx(name of database)
            • set password for database user
            • Driver Class:org.postgresql.Driver
        • Query data base from ThingWorx
          1. Create a Thing with 'Database' as base Thing Template
          2. Create a new service of type SQL(Query) or SQL(command).
          3. Test the service for success


        I hope this helps.


        Best Regards,