dbt-sqlserver
A Microsoft SQL Server adapter plugin for dbt
What it is and what it does
dbt-sqlserver is a plugin that connects the dbt data transformation framework to Microsoft SQL Server and Azure SQL services. It allows you to write dbt models, tests, and macros that run against SQL Server as your data warehouse, following dbt's standard project structure and workflow. The adapter handles SQL Server-specific syntax, schema management, and connection pooling through either pyodbc (the default ODBC-based backend) or an optional mssql-python backend that avoids ODBC driver dependencies.
The adapter supports SQL Server 2017 through 2025 and is tested against Python 3.11, 3.12, and 3.13. It includes features like safe type expansion for incremental models, configurable schema concatenation behavior, transaction control options, and XACT_ABORT handling to prevent partial batch commits on errors. Installation is straightforward via pip, though you must separately install the appropriate SQL Server driver or system libraries depending on which backend you choose.
Use it for:
- Build and test data transformation pipelines on SQL Server without writing raw T-SQL, using dbt's model and test abstractions.
- Migrate dbt projects from other data warehouses to SQL Server or Azure SQL by swapping the adapter and adjusting SQL Server-specific configurations.
- Automate incremental table refreshes with safe column type expansion, avoiding manual schema migrations during model evolution.
- Integrate SQL Server as a dbt-compatible warehouse in multi-warehouse analytics stacks or data mesh architectures.
- Run dbt tests and data quality checks against SQL Server tables as part of a CI/CD pipeline.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A dbt adapter that enables data transformation and testing workflows on Microsoft SQL Server and Azure SQL services, integrating SQL Server as a dbt-supported data warehouse.
Yes. The adapter is production-stable (Development Status 5), actively maintained with a recent release, has no known vulnerabilities, and low install friction. Choose it if you are committed to SQL Server or Azure SQL and want to use dbt's transformation framework. Verify beforehand that your target SQL Server version (2017 or newer) and Python version (3.10+) are supported, and plan for backend dependencies: either the Microsoft ODBC driver or optional mssql-python system libraries.
Install
dbt-sqlserver on PyPI
pip
pip install dbt-sqlserveruv
uv add dbt-sqlserverpoetry
poetry add dbt-sqlserverInstalling dbt-sqlserver
Before you install
Low friction install with pure Python wheel distribution. Active maintenance with a release 3 days old. Requires either pyodbc with Microsoft ODBC driver or optional mssql-python backend; system library dependencies vary by backend choice and OS.
License in practice
MIT license is permissive; you may use, modify, and distribute this adapter freely in commercial and private projects with minimal restrictions.
Quickstart
pip install -U dbt-sqlserver
# In profiles.yml:
your_profile:
target: dev
outputs:
dev:
type: sqlserver
host: your-server
port: 1433
database: your-database
schema: dbo
user: your-user
password: your-password
Requires Microsoft ODBC Driver for SQL Server (pyodbc backend) or system libraries libltdl7, libkrb5-3, libgssapi-krb5-2 (mssql-python backend). Python 3.10 or newer.
Verify before relying
- Whether Azure SQL Database and Azure SQL Managed Instance work reliably in production (documented as expected to be compatible but not covered by integration tests).
- Performance characteristics and scalability limits for large-scale incremental model refreshes with safe type expansion enabled.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — dbt-core, dbt-common, dbt-adapters, pyodbc |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 193,995/month — #9,846 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dbt_sqlserver-1.11.1-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
dbt-fabricA dbt adapter that connects dbt-core to…
permissive · top 5,000 on PyPI
dbt-verticadbt adapter that enables data transformation…
permissive · top 15,000 on PyPI
dbt-coredbt-core transforms raw data in a warehouse…
permissive · top 1,000 on PyPI
dbt-clickhouseA dbt adapter that enables data transformation…
permissive · top 5,000 on PyPI
mssql-python-odbcProvides platform-specific Microsoft ODBC…
unclear · top 15,000 on PyPI
dbt-core-interfaceProvides a lightweight Python interface to…
permissive · top 15,000 on PyPI
dbt-metricflowBundles dbt-core and MetricFlow with compatible…
permissive · top 15,000 on PyPI
dbt-osmosisdbt-osmosis is a CLI tool and Python package…
permissive · top 15,000 on PyPI
dbt-autofixdbt-autofix scans dbt projects for deprecated…
unclear · top 15,000 on PyPI