I want to create a ThingWorx service with sql query. The sql query contains joins and it outputs data in the following fields:
username | action | eventdate | action | eventdate
As you see, the output has fields with same name. Hence, when I run this service, it shows only 3 unique columns i.e. username, action and eventdate.
I need to see all fields in my output. As the datashape accepts only unique field names, how can get output of this service with all columns?
Sorry, I am a bit confused. Why is your SQL query returning two fields with the same name? I believe it is not good design to have two tables with similarly named columns if you intend to join them at some point. Won't SQL have issues querying the joined table as well? Perhaps you could return these tables separately and manually combine them within a service in ThingWorx.
Thanks for your inputs. I could resolve the issue by modifying the sql query and using alias for the duplicate fields.