0

The dataSource property for layers does not return the name of the tables used in query layers. Instead, it returns something like the following:

'Database Connections\\ConnectionFile.sde\\sde.SDE.%queryLayer'  

Whereas the tables in SDE that the query layer is referencing may be called something like sde.SDE.FEATURECLASS (and this is what dataSource would return if the layer were a non-query layer layer).

Since you can't use the dataSource property to return the tables used to make a query layer, how do you return the table names?

Using ArcGIS/ArcPy 10.3 and ArcSDE 10.1

  • It certainly shouldn't return "sde.sde.FEATURECLASS", since naming the database 'sde' hasn't been required since 8.something (and has been actively discouraged since 9.x), and it has never been recommended to load spatial data as the 'sde' user. A better example would be mydb.myuser.FEATURECLASS – Vince Apr 7 '16 at 16:47
  • @Vince Well, it does. That's exactly how data looks in the SDE I use at work, which is 10.1 (I use ArcGIS 10.3 but just realized our SDE is still 10.1). I am not an SDE Administrator, so I don't understand the SDE side of it, but literally, all of our data begins with "sde.SDE." That's what I'm working with, so that's what I need help with. – Kristen G. Apr 7 '16 at 16:55
  • The Describe command might help, desc.featureClass.catalogPath or other property. – klewis Apr 7 '16 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.