ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Workspace properties

  • Summary
  • Properties
  • Code sample

Summary

The Describe function returns the following properties for Workspace.

A Workspace returns a dataType of "Workspace".

Properties

PropertyExplanationData Type
connectionProperties
(Read Only)

The connectionProperties is a property set. The connection properties for an enterprise geodatabase workspace will vary depending on the type of SDE database being used. Possible properties include:

  • authentication_mode—Credential authentication mode of the connection. Either OSA or DBMS.
  • database—Database connected to.
  • historical_name—The historical marker name of the historical version connected to.
  • historical_timestamp—A date time that represents a moment timestamp in the historical version connected to.
  • is_geodatabase—String. Returns true if the database has been enabled to support a geodatabase; otherwise, it's false.
  • instance—Instance connection to.
  • server—SDE server name connected to.
  • user—Connected user.
  • version—The transaction version name of the transactional version connected to.

Only one of historical_name, historical_timestamp, or version exists for any given workspace.

Object
connectionString
(Read Only)

The connection string being used in conjunction with the SDE database type. For any other workspace type, returns an empty string.

String
currentRelease
(Read Only)

For a geodatabase workspace, returns True if the geodatabase's version is current. currentRelease can be used to assess if the geodatabase can be upgraded.

Boolean
domains
(Read Only)

A Python List containing the geodatabase domain names. To work with these domain names, you can use tools from the Domains toolset.

String
release
(Read Only)

For a geodatabase workspace, returns the geodatabase release value. Below is the mapping of geodatabase release values to ArcGIS version numbers.

Geodatabase release valueArcGIS version

2,2,0

9.2

2,3,0

9.3, 9.3.1

3,0,0

10.0, 10.1

String
workspaceFactoryProgID
(Read Only)

The ID is a string. You can use this to distinguish between specific workspace types with a finer granularity than you can with workspaceType. For example, workspaceFactoryProgID can distinguish between a file geodatabase and a personal geodatabase. Using workspaceType, you cannot make that distinction.

Following are workspaceFactoryProgID strings returned for the common workspace types:

  • esriDataSourcesGDB.AccessWorkspaceFactory.1 —Personal geodatabase
  • esriDataSourcesGDB.FileGDBWorkspaceFactory.1 —File geodatabase
  • esriDataSourcesGDB.InMemoryWorkspaceFactory.1 —in_memory workspace
  • esriDataSourcesGDB.SdeWorkspaceFactory.1 —SDE geodatabase
  • (empty string) —Other (shapefile, coverage, CAD, VPF, and so on)
String
workspaceType
(Read Only)

The workspace type.

  • FileSystem —File-based (coverage, shapefile, and so forth) workspaces and in_memory workspaces
  • LocalDatabase —Geodatabases that are local (a file or personal geodatabase)
  • RemoteDatabase —Geodatabases that require a remote connection (ArcSDE, OLE DB, and so forth)
String

Code sample

Workspace properties example (stand-alone script)

The following stand-alone script displays some workspace properties for an SDE database.

import arcpy

# Create a Describe object for an SDE database
#
desc = arcpy.Describe(r"C:data\Connection to state.sde")

# Print workspace properties
#
print "%-24s %s" % ("Connection String:", desc.connectionString)
print "%-24s %s" % ("WorkspaceFactoryProgID:", desc.workspaceFactoryProgID)
print "%-24s %s" % ("Workspace Type:", desc.workspaceType)

# Print Connection properties
#
cp = desc.connectionProperties
print "\nDatabase Connection Properties:"
print "%-12s %s" % ("  Server:", cp.server)
print "%-12s %s" % ("  Instance:", cp.instance)
print "%-12s %s" % ("  Database:", cp.database)
print "%-12s %s" % ("  User:", cp.user)
print "%-12s %s" % ("  Version:", cp.version)

# Print workspace domain names"
#
domains = desc.domains
print "\nDomains:"
for domain in domains:
    print "\t" + domain

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal