Installing DBT on Windows

#1

Installing dbt on Windows. This is one workflow that kinda-sorta worked for onboarding a less-technical analyst.

  1. Get admin privs
  2. Install anaconda for windows: https://conda.io/docs/user-guide/install/windows.html
  3. Open anaconda terminal
  4. conda install -c conda-forge dbt
  5. Create a dbt.bat script in c:\ProgramData\Anaconda3\Scripts with the single line python c:\ProgramData\Anaconda3\Scripts\dbt %*

Potential alternatives to explore and document:

  1. Easy step-by-step install directions for non-anaconda Python.
  2. Dockerized dbt
  3. Create a chocolatey package: https://chocolatey.org/
#2

Another alternative:

  • Set up Windows Subsystem for Linux
  • Install dbt for Linux on your WSL environment (worked on Ubuntu for me)

The main thing to be careful about is ensuring your dbt projects remain in the Windows parts of your filesystem, i.e. don’t put your projects/models in ~/. That way you can edit your models with whatever Windows text editor you like, and you can kick off dbt commands as normal within the WSL bash environment.