0
 Followers
4
 Likes

Show Entity's Physical_Table_Name in Server Studio

Database
New

To those of us that write a lot of queries outside of Server Studio, it would be very helpful to see the physical_table_name property of an entity in the entity properties.

Created on 27 Apr
Comments (8)

Hi David,


Can you say what leads you to write a lot of queries outside of service studio?

If you are writing all of these queries for actual code, you should be using the View4Entity component from the Forge, so you can author them against names that are consistent in each environment, and masks the complexity of the meta data model.

Writing queries directly against the physical table name is bound to lead you to disaster.

J.Ja

If you right click on the entity and click "View Entity", you can track down the physical table name by looking at the Executed SQL.

Good tip, Rebecca. That's it.


Also: the physical table names may differ per environment.

Changed the category to Database


I'm on the side of André here, why do you write a lot of queries outside SS?


I get requests from audit, and other groups, with specific data requests.  I prefer to write the SQL in my database tool of choice. 

Yes, that makes sense, but there are simpler, more direct paths I think for this. Especially since an audit needs Production data, and that would mean that you are connecting Service Studio to a Production instance, which has been known to cause folks to make mistakes (like the next time they make a change, they think they are working in Dev and they are actually working in Prod).

My suggestion is to use the View4Entity component to get friendly names that are consistent across your environments (it supports the exporting/importing of its configuration across environments), and run your queries against that.

J.Ja

views
320
Followers
0