mssql · mssql_ducklakeOpen source · MITAvailable now

Query SQL Server from DuckDB. No drivers, no exports.

mssql speaks SQL Server’s own protocol, so DuckDB reads and writes SQL Server, Azure SQL and Microsoft Fabric directly, and sends the heavy part of each query to the server. mssql_ducklake goes further and keeps a DuckLake catalog in the SQL Server you already run.

Free and open source. Installs from the DuckDB community repository.

DuckDB
INSTALL mssql FROM community;
LOAD mssql;

ATTACH 'Server=sql.corp.local,1433;Database=sales;...'
  AS sales (TYPE mssql);

SELECT region, sum(amount)
FROM sales.dbo.orders
GROUP BY region;  -- runs on SQL Server

Works with DuckDB 1.4.1 and later.

SOUND FAMILIAR?

Your data lives in SQL Server. Your analysis does not.

Analysts export CSV files from SQL Server to work with the data in Python or DuckDB.
An ODBC driver has to be installed and configured on every laptop and server.
Heavy reports run against the production database and slow it down.
Moving tables to Parquet or a lakehouse needs a separate ETL tool.
WHAT YOU GET

SQL Server as a normal DuckDB database.

Attach it once and query it with the rest of your data: files, lakes and other databases, in one SQL statement.

No drivers

A native implementation of SQL Server’s TDS protocol inside the extension. Nothing to install next to DuckDB.

The server does the heavy lifting

Filters, joins, aggregates and window functions run on SQL Server as one T-SQL statement. Only the result crosses the network. EXPLAIN shows the T-SQL.

Fast bulk writes

COPY, CREATE TABLE AS and large INSERTs load through SQL Server’s bulk protocol. Moving a table into or out of SQL Server is one statement.

Company sign-in

SQL logins, Entra ID (service principal, CLI, device code) and Kerberos or Windows integrated authentication. TLS is verified by default.

Real writes

INSERT, UPDATE and DELETE, with transactions you control. Every statement is atomic.

Azure SQL and Fabric too

The same extension works with Azure SQL Database and Microsoft Fabric warehouses.

MEASURED IN PUBLIC

We publish how it works and how fast it is.

49x
faster on a sorted query after ORDER BY pushdown: from 51 seconds to 1 second
1.5x
of the PostgreSQL backend’s total time on a 1,000-table DuckLake benchmark, with commits at parity
Weekly
installs from the DuckDB community repository, charted live on the docs site
ARTICLEFrom 51 seconds to 1 second: DuckDB + SQL Server, 49x fasterARTICLEWhat SQL Server wants from a lakehouse catalog: seven measurementsARTICLEQuerying Azure SQL and Microsoft Fabric from DuckDB with Entra ID
MSSQL_DUCKLAKE · EXPERIMENTAL

A lakehouse catalog in the SQL Server you already run.

DuckLake keeps tables as Parquet files in your storage and their metadata in a database. mssql_ducklake puts that metadata in SQL Server or Azure SQL, so your DBA backs it up, secures it and monitors it like any other database.

  • Snapshots, time travel and schema changes, as in stock DuckLake
  • UPDATE, DELETE and MERGE, with several writers at once
  • No new database to operate: the catalog lives next to your other SQL Server data
DuckDB 1.5.6
INSTALL mssql FROM community;
INSTALL mssql_ducklake FROM community;
LOAD mssql_ducklake;

ATTACH 'ducklake:mssql:Server=host,1433;Database=lake_meta;...'
  AS lake (DATA_PATH 's3://lake/');

-- SQL Server into the lake
CREATE TABLE lake.orders AS
  FROM sales.dbo.orders;
WHAT TEAMS USE IT FOR

From a quick query to a lakehouse.

Analytics off the production server

Pull what you need once, analyse it in DuckDB, and stop running heavy reports against production.

SQL Server to Parquet and DuckLake

Copy tables to Parquet or a DuckLake with one statement, on a schedule or as a one-off migration.

Join across systems

Combine SQL Server with files, PostgreSQL or a lake in one query, without staging tables.

QUESTIONS

Before you install

Do I need ODBC or any Microsoft driver?

No. The extension implements the protocol itself. INSTALL and LOAD are all it takes.

Does it work with Azure SQL and Microsoft Fabric?

Yes, including Entra ID sign-in. See the connection guide in the docs.

Is it production-ready?

Both are marked experimental while their APIs settle. The docs list known limitations, and GitHub issues are answered by the people who wrote the code.

What does it cost?

Nothing. Both extensions are open source under the MIT licence.

Where do I get help?

Open an issue on GitHub. For larger projects, Hugr Lab offers data engineering services from November 2026.

Install it in a minute.

Two lines in DuckDB, and your SQL Server is one more database in your queries.

Planning a migration or a lakehouse on SQL Server? We take on projects from November 2026. Write to us.

Get startedStar on GitHub