Summary
Converts a table or feature class to an Apache Arrow table.
Discussion
Apache Arrow is a standard cross-platform in-memory representation of columnar data. An Arrow table is a two-dimensional tabular representation in which columns are Arrow chunked arrays. The data types for the columns are determined by the field types of the input table or feature class, with support for types unique to ArcGIS Pro provided by Arrow extension types.
Geoprocessing tools that accept a table or feature class as input (and do not modify the input) will accept a PyArrow table as input. While a geoprocessing tool will accept an Arrow table as input, a tool will not output an Arrow table.
Syntax
TableToArrowTable (in_table)
Parameter | Explanation | Data Type |
in_table | The feature class, layer, table, or table view. | String |
Data Type | Explanation |
PyArrowTable | The output pyarrow.Table. See the pyarrow.Table object API. |
Code sample
Convert a feature class to an Arrow table and count the number of counties in the dataset.
import arcpy
input = r'C:\data\usa.gdb\USA\counties'
arrow_table = arcpy.da.TableToArrowTable(input)
# Get the number of counties in the dataset
count = arcpy.management.GetCount(arrow_table)
print("Number of US Counties:", count)