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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

How to joined query two data table?

fzhong
5-Regular Member

How to joined query two data table?

Hi,

     is it possible to query two Data Table with joined field in thingworx? just like what we do in relational database sql. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

I've never did, but you shouldn't have any problem to have two JDBC connections to the same Database from different servers.

View solution in original post

8 REPLIES 8

Search for Intersect Snippet

ankigupta
5-Regular Member
(To:fzhong)

Hi Feng Zhang​,

Basically; we read the DataTable in two Infotables and apply InfoTable functions. You have option to apply Intersect (suggested by Carles) or Union (If the Datashape of both DataTables is same) as per your requirement.

fzhong
5-Regular Member
(To:ankigupta)

Carles ​&  Ankit Gupta

     Thank you for answer, but if these are two big Data Table,  will it be performance issue to read all data into Infotables?

ankigupta
5-Regular Member
(To:fzhong)

Hi Feng Zhang​,

Yes, there could be performance issues when reading very large amount of data to infotables. It will vary based on the system configuration and network connectivity etc.

fzhong
5-Regular Member
(To:ankigupta)

So I think I should seek for alternate solution because some of my Data Tables has more than 1 million rows.

The DataTable it's a standard TW DataTable? if that's the case you are out of luck, you shouldn't use TW DataTables bigger than few hundred and thousand rows, you should go for an external storage database for this kind of DataTables and use embedded SQL support ( JDBC ) that provides TW.

fzhong
5-Regular Member
(To:CarlesColl)

Thank you Carles, is there any limitation to store data in external storage database? For example,  can we share  things stored  externally between federation instances?

I've never did, but you shouldn't have any problem to have two JDBC connections to the same Database from different servers.

Top Tags