Workspace properties
Summary
The Describe function returns the properties described below for a workspace.
For a workspace, the Describe dataType property returns a value of "Workspace".
Properties
| Property | Explanation | Data Type | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
connectionProperties (Read only) |
The connection properties for an enterprise geodatabase workspace will vary depending on the type of enterprise database being used.
Only one |
Object |
||||||||
|
connectionString (Read only) |
The connection string that is used in conjunction with the enterprise database type. For any other workspace type, an empty string is returned. |
String |
||||||||
|
currentRelease (Read only) |
For a geodatabase workspace, specifies whether the geodatabase's version is current. This property can be used to assess whether the geodatabase can be upgraded. |
Boolean |
||||||||
|
domains (Read only) |
A list containing the geodatabase domain names. To work with these domain names, use tools in the Domains toolset. |
String |
||||||||
|
release (Read only) |
For a geodatabase workspace, returns the geodatabase release value. The following table shows the mapping of geodatabase release values to ArcGIS version numbers:
|
2,2,0 |
||||||||
|
supportsBigInteger (Read only) |
Specifies whether the workspace supports Big Integer type fields. |
Boolean |
||||||||
|
supportsBigObjectID (Read only) |
Specifies whether the workspace supports objects with a 64-bit object ID. |
Boolean |
||||||||
|
supportsDateOnly (Read only) |
Specifies whether the workspace supports fields of type Date Only. |
Boolean |
||||||||
|
supportsTimeOnly (Read only) |
Specifies whether the workspace supports fields of type Time Only. |
Boolean |
||||||||
|
supportsTimestampOffset (Read only) |
Specifies whether the workspace supports fields of type Timestamp Offset. |
Boolean |
||||||||
|
workspaceFactoryProgID (Read only) |
The ID is a string that you can use to distinguish between workspace types with a finer granularity than you can with The following are
Legacy:Prior to ArcGIS Pro 3.0, a memory workspace would return a value of Tip:In 32-bit products, a
|
String |
||||||||
|
workspaceType (Read only) |
Specifies the workspace type.
|
String |
Code sample
Workspace properties example
The following stand-alone script displays workspace properties for an enterprise database:
import arcpy
# Create a Describe object for an enterprise database
desc = arcpy.Describe(r"c:\data\Connection to state.sde")
print(f"Connection string: {desc.connectionString}")
print(f"WorkspaceFactoryProgID: {desc.workspaceFactoryProgID}")
print(f"Workspace type: {desc.workspaceType}")
# Print connection properties
cp = desc.connectionProperties
print("\nDatabase Connection Properties:")
print(f" Server: {cp.server}")
print(f" Instance: {cp.instance}")
print(f" Database: {cp.database}")
print(f" Database client: {cp.dbClient}")
print(f" User: {cp.user}")
print(f" Version: {cp.version}")
# Print workspace domain names
domains = desc.domains
print("\nDomains:")
for domain in domains:
print(f" {domain}")