mssql-python now supports fetching SQL Server data directly as Apache Arrow structures, enabling zero-copy, columnar data transfer to Polars, Pandas, DuckDB, and other Arrow-native libraries. Three new Cursor APIs are introduced: cursor.arrow_batch() for incremental batch fetching, cursor.arrow() for eager full result set retrieval as a pyarrow.Table, and cursor.arrow_reader() for lazy streaming via a RecordBatchReader. The Arrow path avoids Python object creation per row, reducing GC pressure and memory usage. Temporal types like DATETIME and DATETIMEOFFSET show the largest performance gains since timezone normalization runs entirely in C++. A known limitation exists for NVARCHAR on Linux due to a slower UTF-16 to UTF-8 conversion path, with a fix planned. The feature was contributed by community developer Felix Graßl and is purely additive — existing fetchone/fetchmany/fetchall code is unaffected.
Table of contents
What Is Apache Arrow? Copy linkThe Arrow Fetch APIs Copy linkTesting Copy linkGetting Started Copy linkWhat’s Next Copy linkA Note of Thanks Copy linkResources Copy linkSort: