Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hi There,
Want to provide the postgreSQL database command in input and show the output , which category widget, should I using Thingworx Mashup?
Thanks in advance
Just to clarify, you want to enter a SQL query as text into a mashup and execute that query on a Postgresql database?
If so, I would not recommend letting a user enter raw sql into a mashup to have it executed directly on a DB due to the numerous ways that somebody either maliciously or accidentally could mess up your database. I always wrap my database services in a JavaScript service and hide the implementation from the users.
With that said, if you really need to accomplish this, you'll need to:
1. Set up a DatabaseThing that connects to your database
2. Create a service that takes an input called myQuery (or whatever you want)
3. The code of the service will just be:
<<myQuery>>
4. In your mashup, you'll just have a Grid widget that you can show the result in.
Hope that helps,
Nick