dbt-azuredw is a custom adapter for dbt that adds support for Azure SQL Data Warehouse.. pyodbc is used as the connection driver as that is what is suggested by Microsoft. The adapter supports both windows auth, and specified user accounts.
dbt-azuredw is currently in a beta release.
Use the profiles.yml file included as a guide, updating with your creds. You can find all the creds you need under Home > dbname (account/dbname) - Connection strings in Azure, along with the username and password for authentication.
- Run this to keep your profiles.yml from tracking:
git update-index --skip-worktree profiles.yml
- Update profiles.yml with your actual Azure Data Warehouse creds.
- Build the docker image. From the repo root:
docker build . -t dbt-azure-dw
- Run a bash shell in the container:
docker run -v $(PWD):/dbt_development/plugins -it dbt-azure-dw /bin/bash
you can then jump into jaffle_shop (mssql)
and work on making it run against your ADW!
Sample profiles.yml
default:
target: dev
outputs:
dev:
type: azuredw
driver: 'ODBC Driver 17 for SQL Server'
host: account.database.windows.net
database: dbt_test
schema: foo
username: dbt_user
password: super_secret_dbt_password
authentication: ActiveDirectoryPassword
- At this time dbt-azuredw supports only
table
,view
andincremental
materializations (noephemeral
) - Only top-level (model) CTEs are supported, ie CTEs in macros are not supported (this is a sqlserver thing)
Fishtown Analytic's jaffle shop package is currently unsupported by this adapter. At the time of this writing, jaffle shop uses the using()
join, and group by [ordinal]
notation which is not supported in T-SQL. An alternative version has been forked by the author of dbt-mssql here.