cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

how do i get a table that i created in postgre to thingworx?

schakravarthy
7-Bedrock

how do i get a table that i created in postgre to thingworx?

i want to transfer the table created in postgre to thingworx composer, can you pls tell me the procedure for it.

6 REPLIES 6

Hi Swetha, are you using PostgreSQL as your ThingWorx's Persistence Provider or are you connecting to it via the JDBC connector/RDBMS connector? Also could you please elaborate a bit on your use case, are you just looking to show some data in ThingWorx Composer via a Mashup with for e.g. a grid widget? That won't require you to transfer data, you will be able to show this data in the mashup just via the SQL services.

Hi Sushant , i wana display my database values in my mashup, so i need procedure for that . Also is there any proper demo video for understanding data storage in thingworx?

Swetha assuming this is an external database, you can configure the Relational Databases Connectors or JDBC Connector Extension to connect to the database and query the table, you can download these extensions to ThingWorx from the ThingWorx Marketplace. Both of these extensions include the setup guide.

Additional reading :

Accelerate analytics and transactions on external data store for ThingWorx using Oracle 12c In Memory Column Store featu…

Types of JDBC Calls from JDBC Extension & RDBMS Extension in ThingWorx

Please tell me all the steps how to make a connection and show in table i made jdbc driver work


@supandey wrote:

Hi Swetha, are you using PostgreSQL as your ThingWorx's Persistence Provider or are you connecting to it via the JDBC connector/RDBMS connector? Also could you please elaborate a bit on your use case, are you just looking to show some data in ThingWorx Composer via a Mashup with for e.g. a grid widget? That won't require you to transfer data, you will be able to show this data in the mashup just via the SQL services.


 

Please tell me all the steps how to make a connection and show in table i made jdbc driver work


Hi,

 

1. Create a thing using template Database/MySqlServer (install extension MySql_Extension or other extension for database, this example is for MySql, you can do the same for other database)

2. In Configuration tab, add :

JDBC Driver Class Name = com.mysql.jdbc.Driver

JDBC Connection String = jdbc:mysql://<ip_address>:<port>/<database_name>?allowMultiQueries=true

connectionValidationString = SELECT NOW()

Database User Name = <database_user>

Password = <password>

 

3. Save

4. Add a new Service  "GetRecords" to the new-created Thing, select type "SQL (Query)", output InfoTable, add/create DataShape for output. In service, add the following to get the records from a specific table:

 

select * from <database_table>

 

5. Save

6. Create mashup, add a Grid widget

7. Bind the output of GetRecords service to the Grid

8. Run Mashup and you will get the records from the table in the Grid widget.

 

Hope it helps,

Raluca Edu

Announcements


Top Tags