Skip to content

Latest commit

 

History

History
95 lines (60 loc) · 4.11 KB

File metadata and controls

95 lines (60 loc) · 4.11 KB

dbt-sqlserver

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.

Documentation

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.

Installation

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

Latest version: PyPI

pip install -U dbt-sqlserver

Latest pre-release: GitHub tag (latest SemVer pre-release)

pip install -U --pre dbt-sqlserver

Changelog

See the changelog

Configuration

Flags

  • 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_name Result
    false (default, legacy) (none) target.schema
    false (default, legacy) "reporting" reporting
    true (dbt-core standard) (none) target.schema
    true (dbt-core standard) "reporting" target.schema_reporting

    When false (the default), the adapter uses its legacy behaviour: custom_schema_name is used as-is without being prefixed by target.schema.
    When true, the adapter delegates to dbt-core's default__generate_schema_name, which concatenates target.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_name macro directly in your project.

Contributing

Unit tests Integration tests on SQL Server Integration tests on Azure

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.

License

PyPI - License

Code of Conduct

This project and everyone involved is expected to follow the dbt Code of Conduct.