

Our team uses conda envs because we have many different projects with different sets of package requirements, but if dbt is 1) your only use case for Python, or 2) your first Python-based use case, you’ll likely have a better time with virtualenvs. Three popular tools are venv’s, virtualenv’s and conda environments. It’s better practice to have a dedicated dbt environment. You OS likely already has a version of python installed, but this can be troublesome because you don’t control it’s version. Python can be tricky get working in VSCode (and trickier to work on Windows). Some folks deem this problem so difficult as to justify having users use Docker containers, but I have yet to be convinced of that yet. More context is that some folks have bundled this set up process into bash scripts and Docker containers. Sounds simple, but below is a one-time setup guide on how to make it work. The goal of this section is to ensure that the right version of Python and dbt are always available right away when you open your dbt project in VSCode. Then, open the jaffle_shop/ directory in VSCode. You can use the Git CLI or the VSCode Git extension to Git Clone command in VSCode git clone To get started, we’ll use the jaffle_shop repo, a self-contained project. vscode directory that contains a settings.json and an extensions.json Getting started In VSCode you’ll also need to install the Python extension If you already know VSCode You should also have the following installed: It covers a lot of the basics like installing Python, the Python extension, and the command pallette. If you’ve never used VSCode with Python, I strongly recommend at least the first half of Dan Taylor’s Get Productive with Python in Visual Studio Code talks.

a stable, reproducible Python environment for running dbt.Goalsįollowing this guide will enable the following behavior in VSCode (some points lifted from Claire’s guide – linked above) I’m also going to add things to make it easier for working with Azure databases such as the Azure CLI and Azure Data Studio. I thought I’d consolidate some of this into a single article, and expand on it given the recent developments. Many folks commented on how they acheived similar productivity using VSCode.

The post details how the dbt team uses Atom and iTerm 2 on macOS for an improved workflow. When our team first started using the dbt CLI, we started with Claire’s well-loved discourse post, How we set up our computers for working on dbt project. For the most-up-to-date version, you might want to go here: Using VSCode with dbt | dbt-sqlserver-docs Intro
