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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Easiest way to connect an SQL database to Thingworx Studio? For the beginner.

ckoenig
7-Bedrock

Easiest way to connect an SQL database to Thingworx Studio? For the beginner.

I'd be very grateful if someone can list out the steps to connect an SQL database to a thingmark in Studio.

Maybe a table that will have 3 columns and 9 rows.

Even the most basic steps will be of help, thank you!!!

Message was edited by: Sushant Pandey moved it to Studio

2 REPLIES 2
dupatel
19-Tanzanite
(To:ckoenig)

Charlie Koenig​: I am not sure if I understood your request correctly and it will help if you can clarify.Do you want to get data from MS SQL data into ThingWorx Studio.

As per my understanding you will have to first configure this SQL database as external data into ThingWorx and use ThingWorx services to retrieve the required data from SQL database.

Then, using ThingWorx Studio you can access the data by using option add External Data.

-Durgesh

jamesm1
12-Amethyst
(To:ckoenig)

Grab the JDBC extension package from the marketplace: https://marketplace.thingworx.com/tools/jdbc-connector-extension

or, if it's for Postgres, MSSQL, MySql, or Oracle, you can grab the specific extension with the JDBC driver included here: https://marketplace.thingworx.com/tools/Relational-databases-connectors

From here:

  • Import the appropriate DB extension
  • Create a new database thing based on the appropriate template (i.e. MSSQLServer template for MS SQL Server)
  • Configure the JDBC connection string
  • Create a new service
    • On the top left of tthe service panel, in the service handler drop down, select SQL Query
    • Write the SQL query
    • Test the service and create a datashape from the result, apply the datashape to the service
  • Continue as Durgesh responded above by using TWX studio to add external data
    • Find your database thing
    • Find the service you created with the SQL query
    • Bind to your widget
Announcements

Top Tags