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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Calling Thing properties in a SQL command in Twx

PabloCastilla
8-Gravel

Calling Thing properties in a SQL command in Twx

Greetings,

 

To provide a context:

I'm building an app to store data from an experience. The process is simple, the app gets data from users and share it to Twx, Twx sends the data to pSQL and gets all data stored in the db to show it in a mashup.

 

Now, I'm triying to send the data to postgresql. 

I created a js service to get the data from vuforia. I just read that I can't use "me.property" in SQL commands, that I should create variables in the js service and invoke those variables into the SQL command. But I'm not sure how.

A different way I thought I could use was to call the Thing property into the SQL. But It didn't work, I think is because I didn't use the right command.

Another way was to input the data directly into the SQL but I will have the same problems later in the process because I will need the data to use it in different services.

 

Do you have any advise? Is there any guide about programming SQL in Twx? 

 

Thank you a lot for all your advises. 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @bchaudhary ,

 

Thanks for your answer. I'll check those articles, I've just solved the issue by inputting the data twice, first for the js service and the second for the SQL service. I'm not sure if it's efficient, but it works. 

 

May I ask if there's a way to use the Thing properties in the SQL scripts? How can I call/invoke them in the SQL scripts?

View solution in original post

2 REPLIES 2

Hello @PabloCastilla ,

 

We do not have a specific guide that contains the sql commands/ queries on TWX. However, Pls check the given article and the result will always be in the form of infotable which you can use later in other services very swiftly.

https://www.ptc.com/en/support/article/cs366970

Also pls chcek a very basic article explaining the use of sql command and query in TWX.

https://www.ptc.com/en/support/article/cs209612

 

also, you can share the errors that you are facing while trying the SQL with TwX.

 

Regards

Bhawna

 

Hello @bchaudhary ,

 

Thanks for your answer. I'll check those articles, I've just solved the issue by inputting the data twice, first for the js service and the second for the SQL service. I'm not sure if it's efficient, but it works. 

 

May I ask if there's a way to use the Thing properties in the SQL scripts? How can I call/invoke them in the SQL scripts?

Top Tags