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 used to efficiently transport data between analytics systems for big data. For more information, see working with Apache Arrow in ArcGIS.
Syntax
TableToArrowTable ({in_table}, {field_names}, {where_clause})
Parameter | Explanation | Data Type |
in_table | The feature class, layer, table, or table view. | String |
field_names [field_names,...] | A list (or tuple) of field names. For a single field, you can use a string instead of a list of strings. (The default value is "") | String |
where_clause | An optional expression that limits the records returned. For more information on where clauses and SQL statements, see SQL reference for query expressions used in ArcGIS. (The default value is "") | 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)