skillfed

dbt-sqlserver

A Microsoft SQL Server adapter plugin for dbt

dbt-sqlserver v1.11.1 194.0K downloads/30d#9,846 on PyPI254
Permissive license MIT Active released

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-sqlserver

uv

uv add dbt-sqlserver

poetry

poetry add dbt-sqlserver

Installing 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

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

dbt sql server adapterdbt microsoft sql serverdbt azure sqlsql server dbt plugindbt mssql integrationdata transformation sql serverdbt sqlserver backend
dbt-adaptersql-serverdata-transformation

More Database packages