Skip to main content

A Microsoft SQL Server adapter plugin for dbt

Project description

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:

    flags:
      dbt_sqlserver_use_default_schema_concat: true  # Enable standard schema concatenation
    

    This adapter also supports the same setting via vars: for backwards compatibility, so either method works in the current release.

    Note: If you want to permanently customise schema generation and avoid any future changes, override the sqlserver__generate_schema_name macro directly in your project instead.

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.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt_sqlserver-1.10.0.tar.gz (41.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_sqlserver-1.10.0-py3-none-any.whl (58.4 kB view details)

Uploaded Python 3

File details

Details for the file dbt_sqlserver-1.10.0.tar.gz.

File metadata

  • Download URL: dbt_sqlserver-1.10.0.tar.gz
  • Upload date:
  • Size: 41.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for dbt_sqlserver-1.10.0.tar.gz
Algorithm Hash digest
SHA256 675d6f3a155100150768699ebc6e283eada8893c084c5b0c7470b5d78e147dc8
MD5 43c76da29170f417bbb32aa7030d1bba
BLAKE2b-256 358eaf6684facee12bbac860a3bf2ce4925d2b8600ef2da302a7e72779cf74a0

See more details on using hashes here.

File details

Details for the file dbt_sqlserver-1.10.0-py3-none-any.whl.

File metadata

  • Download URL: dbt_sqlserver-1.10.0-py3-none-any.whl
  • Upload date:
  • Size: 58.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for dbt_sqlserver-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6db867b9950e3645ca3ac071a868d35da6e4e51e4947d01d05d01fb83b32e525
MD5 992fceb32f6a93def26e48111e18c538
BLAKE2b-256 5defbbb836b346de940b2b6e896904a0b76bf8cf6d90730224c4a4d1a275e994

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page