Select to view content in your preferred language

arcpy.Describe()

295
2
Jump to solution
3 weeks ago
AprilSummers
New Contributor II

AprilSummers_0-1716573667553.png

How can we extract these properties from a feature class in an Enterprise GeoDatabase. I particularly want to extract the 'Instance' values

I am using arcpy.Describe(featureclass). It doesn't give me instance. I looked up the object properties and it is not listed in the documentation. 

https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/describe-object-properties.htm

I even used arcpy.da.Describe(featureclass). Still, couldn't get the value of instance. 

Any pointers would be greatly appreciated!

0 Kudos
1 Solution

Accepted Solutions
MobiusSnake
MVP

Those are properties of the feature class' workspace rather than the feature class itself.  You'll want to do something like this:

  • Get a Describe object for your feature class
  • Use the workspace property to get a Describe object for the workspace (a database in this case)
  • Access the properties of that object (see this page)

View solution in original post

0 Kudos
2 Replies
MobiusSnake
MVP

Those are properties of the feature class' workspace rather than the feature class itself.  You'll want to do something like this:

  • Get a Describe object for your feature class
  • Use the workspace property to get a Describe object for the workspace (a database in this case)
  • Access the properties of that object (see this page)
0 Kudos
AprilSummers
New Contributor II

Thank you! That solved it. 

It's feels a bit convoluted. I must say though that the 'instance' in connection properties was not the same 'instance' in the data source properties screenshot. I had to use cp.database

cp.instance returned the value of 'Server'

0 Kudos