What is the Data Access module

The Data Access module, arcpy.da, is a Python module for working with data. It allows control of the edit session, edit operation, improved cursor support (including faster performance), functions for converting tables and feature classes to and from NumPy arrays, and support for versioning, replicas, domains, and subtypes workflows.

Data Access classes

ClassDescription
ContingentFieldValue

The ContingentFieldValue object contains properties that describe the properties of the field used for a contingent value.

ContingentValue

The ContingentValue object contains properties that describe a contingent value.

DatabaseSequence

The DatabaseSequence object contains properties that describe a database sequence.

Domain

The Domain object contains properties that describe an attribute domain.

Editor

The Editor object allows the use of edit sessions and operations to manage database transactions.

InsertCursor

The InsertCursor object establishes a write cursor on a feature class or table. InsertCursor can be used to add new rows.

Replica

The Replica object contains properties that describe a replica.

SearchCursor

The SearchCursor object establishes read-only access to the records of a feature class or table.

SearchRelatedRecords

The SearchRelatedRecords object retrieves related records based on the relationship between the origin and destination feature class or table defined in a relationship class.

SyncReplica

The SyncReplica object contains properties that describe a replica created through a sync-enabled feature service. Replicas created from nonversioned data with archiving or from branch versioned data are included.

UpdateCursor

The UpdateCursor object establishes read-write access to records returned from a feature class or table.

Version

The Version object contains properties that describe a version.

Data Access functions

FunctionDescription
CreateParquetCache

The CreateParquetCache function creates a persistent local cache for an Apache Parquet file.

CreateTable

The CreateTable function creates a table or feature class with a defined set of fields in a specified location.

Describe

The Describe function returns a dictionary with multiple data properties, such as data type, fields, indexes, and many others. The dictionary's keys are dynamic, meaning that depending on what data type is described, different properties will be available for use.

ExtendTable

The ExtendTable function joins the contents of a NumPy structured array to a table based on a common attribute field. The input table is updated to contain the fields from the join table.

FeatureClassToNumPyArray

The FeatureClassToNumPyArray function converts a feature class to NumPy structured array.

ListContingentValues

The ListContingentValues function lists the contingent values on a table. Search conditions can be specified for the field group name and subtype to limit the list that is returned.

ListDatabaseSequences

The ListDatabaseSequences function lists the database sequences in a database.

ListDomains

The ListDomains function lists the attribute domains belonging to a geodatabase.

ListFieldConflictFilters

The ListFieldConflictFilters function lists the fields in a versioned feature class, table, or feature service layer that have field conflict filters applied.

ListReplicas

The ListReplicas function lists the replicas in the workspace.

ListSubtypes

The ListSubtypes returns a dictionary of the subtypes for a table or feature class.

ListVersions

The ListVersions function lists the versions in the workspace.

NumPyArrayToFeatureClass

The NumPyArrayToFeatureClass function converts a NumPy structured array to a point feature class.

NumPyArrayToTable

The NumPyArrayToTable function converts a NumPy structured array to a table.

TableToArrowTable

The TableToArrowTable function converts a table or feature class to an Apache Arrow table.

TableToNumPyArray

The TableToNumPyArray function converts a table to a NumPy structured array.

Walk

The Walk function returns data names in directory and database structures by moving through the tree from the top down or the bottom up. Each directory or workspace yields a tuple of three: directory path, directory names, and file names.