dbt adapter for Microsoft SQL Server and Azure SQL services.
The adapter supports dbt-core 0.14 or newer and follows the same versioning scheme. E.g. version 1.1.x of the adapter will be compatible with dbt-core 1.1.x.
We've bundled all documentation on the dbt docs site:
Join us on the dbt Slack to ask questions, get help, or to discuss the project.
This adapter requires the Microsoft ODBC driver to be installed: Windows | macOS | Linux
Debian/Ubuntu
Make sure to install the ODBC headers as well as the driver linked above:
sudo apt-get install -y unixodbc-devpip install -U dbt-sqlserverpip install -U --pre dbt-sqlserverSee the changelog
-
dbt_sqlserver_use_default_schema_concat: (default:false) Controls schema name generation when a custom schema is set on a model.Flag value custom_schema_nameResult false(default, legacy)(none) target.schemafalse(default, legacy)"reporting"reportingtrue(dbt-core standard)(none) target.schematrue(dbt-core standard)"reporting"target.schema_reportingWhen
false(the default), the adapter uses its legacy behaviour:custom_schema_nameis used as-is without being prefixed bytarget.schema.
Whentrue, the adapter delegates to dbt-core'sdefault__generate_schema_name, which concatenatestarget.schema+_+custom_schema_name.Example usage in
dbt_project.yml:vars: dbt_sqlserver_use_default_schema_concat: true # Enable standard schema concatenation
Note: If you want to permanently customise schema generation and avoid any future deprecation of this flag, override the
sqlserver__generate_schema_namemacro directly in your project.
This adapter is community-maintained. You are welcome to contribute by creating issues, opening or reviewing pull requests or helping other users in Slack channel. If you're unsure how to get started, check out our contributing guide.
This project and everyone involved is expected to follow the dbt Code of Conduct.