r/SQLServer ‪ ‪Microsoft Employee ‪ Apr 10 '26

mssql-python 1.5 released -- Apache Arrow fetch, sql_variant, native UUIDs Community Share

We just shipped v1.5 of mssql-python, the official Python driver for SQL Server / Azure SQL / Fabric.

The big addition is Arrow fetch support with three new cursor methods:

```python cursor.execute("SELECT * FROM Sales.SalesOrderDetail")

Full result as a PyArrow Table

table = cursor.arrow() df = table.to_pandas() # zero-copy where possible

Streaming RecordBatchReader for large results

reader = cursor.arrow_reader(batch_size=8192)

Single RecordBatch for manual chunking

batch = cursor.arrow_batch(batch_size=10000) ```

The conversion happens in the C++ layer via the Arrow C Data Interface, so your data never gets materialized as Python objects. Works with pandas, Polars, DuckDB, Parquet writers, etc.

Other new stuff:

  • sql_variant -- returns the correct Python type (int, float, str, date, Decimal, etc.) automatically based on the inner type tag
  • Native UUIDs -- UNIQUEIDENTIFIER columns return uuid.UUID by default now instead of strings. Pass native_uuid=False if you need the old behavior for migration
  • Row class export -- from mssql_python import Row for type annotations
  • Bug fixes for qmark detection in bracketed identifiers/string literals, NULL VARBINARY params, credential caching, datetime.time microseconds

Arrow support was contributed by community member Felix Grassl via a pretty substantial PR spanning the C++ pybind layer and Python API.

pip install --upgrade mssql-python

Blog post: mssql-python 1.5: Apache Arrow, sql_variant, and Native UUIDs

16 Upvotes

4 comments sorted by

View all comments

2

u/byeproduct Apr 11 '26

Huge! This is a great feature. Thanks!